use of com.microsoft.azure.toolkit.ide.common.store.DefaultMachineStore in project azure-tools-for-java by Microsoft.
the class Activator method start.
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
pluginInstLoc = Paths.get(PluginUtil.pluginFolder, File.separator, com.microsoft.azuretools.core.utils.Messages.commonPluginID).toString();
dataFile = Paths.get(pluginInstLoc, File.separator, com.microsoft.azuretools.core.utils.Messages.dataFileName).toString();
AzureStoreManager.register(new DefaultMachineStore(Paths.get(pluginInstLoc, "azure.json").toString()), new EclipseStore(), new EclipseSecureStore());
AzureTaskManager.register(new EclipseAzureTaskManager());
AzureMessager.setDefaultMessager(new EclipseAzureMessager());
DefaultLoader.setPluginComponent(this);
DefaultLoader.setIdeHelper(new IDEHelperImpl());
SchedulerProviderFactory.getInstance().init(new AppSchedulerProvider());
MvpUIHelperFactory.getInstance().init(new MvpUIHelperImpl());
AzureConfigInitializer.initialize(InstallationIdUtils.getHashMac(), "Azure Toolkit for Eclipse", Activator.getDefault().getBundle().getVersion().toString());
initAzureToolsCoreLibsSettings();
// load up the plugin settings
try {
loadPluginSettings();
} catch (IOException e) {
showException("Azure Core Plugin", "An error occurred while attempting to load settings for the Azure Core plugin.", e);
}
findObsoletePackages(context);
super.start(context);
}
use of com.microsoft.azure.toolkit.ide.common.store.DefaultMachineStore in project azure-tools-for-java by Microsoft.
the class AzureActionsListener method appFrameCreated.
@Override
public void appFrameCreated(@NotNull List<String> commandLineArgs) {
DefaultLoader.setPluginComponent(this);
DefaultLoader.setUiHelper(new UIHelperImpl());
DefaultLoader.setIdeHelper(new IDEHelperImpl());
AzureTaskManager.register(new IntellijAzureTaskManager());
AzureRxTaskManager.register();
AzureMessager.setDefaultMessager(new IntellijAzureMessager());
IntellijAzureActionManager.register();
Node.setNode2Actions(NodeActionsMap.NODE_ACTIONS);
SchedulerProviderFactory.getInstance().init(new AppSchedulerProvider());
MvpUIHelperFactory.getInstance().init(new MvpUIHelperImpl());
HDInsightLoader.setHHDInsightHelper(new HDInsightHelperImpl());
AzureStoreManager.register(new DefaultMachineStore(PluginHelper.getTemplateFile("azure.json")), IntellijStore.getInstance(), IntelliJSecureStore.getInstance());
try {
loadPluginSettings();
} catch (IOException e) {
PluginUtil.displayErrorDialogAndLog("Error", "An error occurred while attempting to load settings", e);
}
AzureInitializer.initialize();
if (!AzurePlugin.IS_ANDROID_STUDIO) {
// enable spark serverless node subscribe actions
ServiceManager.setServiceProvider(CosmosSparkClusterOpsCtrl.class, new CosmosSparkClusterOpsCtrl(CosmosSparkClusterOps.getInstance()));
ServiceManager.setServiceProvider(TrustStrategy.class, IdeaTrustStrategy.INSTANCE);
initAuthManage();
ActionManager am = ActionManager.getInstance();
DefaultActionGroup toolbarGroup = (DefaultActionGroup) am.getAction(IdeActions.GROUP_MAIN_TOOLBAR);
toolbarGroup.addAll((DefaultActionGroup) am.getAction("AzureToolbarGroup"));
DefaultActionGroup popupGroup = (DefaultActionGroup) am.getAction(IdeActions.GROUP_PROJECT_VIEW_POPUP);
popupGroup.add(am.getAction("AzurePopupGroup"));
}
try {
PlatformDependent.isAndroid();
} catch (Throwable ignored) {
DefaultLoader.getUIHelper().showError("A problem with your Android Support plugin setup is preventing the" + " Azure Toolkit from functioning correctly (Retrofit2 and RxJava failed to initialize)" + ".\nTo fix this issue, try disabling the Android Support plugin or installing the " + "Android SDK", "Azure Toolkit for IntelliJ");
// DefaultLoader.getUIHelper().showException("Android Support Error: isAndroid() throws " + ignored
// .getMessage(), ignored, "Error Android", true, false);
}
}
Aggregations