提交 73086f83 编写于 作者: S serge-rider

Snowflake UI plugin refactoeing


Former-commit-id: b217252e
上级 4f2d20a5
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.ext.bigquery;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class BigQueryActivator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.jkiss.dbeaver.ext.bigquery";
// The shared instance
private static Activator plugin;
public BigQueryActivator() {
}
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
public static Activator getDefault() {
return plugin;
}
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
}
......@@ -4,7 +4,7 @@ Bundle-Name: Snowflake UI
Bundle-SymbolicName: org.jkiss.dbeaver.ext.snowflake.ui;singleton:=true
Bundle-Version: 1.0.14.qualifier
Bundle-Release-Date: 20181008
Bundle-Activator: org.jkiss.dbeaver.ext.snowflake.Activator
Bundle-Activator: org.jkiss.dbeaver.ext.snowflake.SnowflakeUIActivator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.jface.text,
......
......@@ -23,15 +23,15 @@ import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
public class SnowflakeUIActivator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.jkiss.dbeaver.ext.snowflake.ui";
// The shared instance
private static Activator plugin;
private static SnowflakeUIActivator plugin;
public Activator() {
public SnowflakeUIActivator() {
}
@Override
......@@ -46,7 +46,7 @@ public class Activator extends AbstractUIPlugin {
super.stop(context);
}
public static Activator getDefault() {
public static SnowflakeUIActivator getDefault() {
return plugin;
}
......
......@@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.ext.snowflake.Activator;
import org.jkiss.dbeaver.ext.snowflake.SnowflakeUIActivator;
import org.jkiss.dbeaver.ext.snowflake.SnowflakeConstants;
import org.jkiss.dbeaver.model.DBPDataSourceContainer;
import org.jkiss.dbeaver.model.connection.DBPConnectionConfiguration;
......@@ -63,7 +63,7 @@ public class SnowflakeConnectionPage extends ConnectionPageAbstract implements I
private Text usernameText;
private Text passwordText;
private static ImageDescriptor logoImage = Activator.getImageDescriptor("icons/snowflake_logo.png");
private static ImageDescriptor logoImage = SnowflakeUIActivator.getImageDescriptor("icons/snowflake_logo.png");
@Override
public void dispose()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册