當前位置: 首頁>>代碼示例>>Java>>正文


Java PluginManager.getPluginByClassName方法代碼示例

本文整理匯總了Java中com.intellij.ide.plugins.PluginManager.getPluginByClassName方法的典型用法代碼示例。如果您正苦於以下問題:Java PluginManager.getPluginByClassName方法的具體用法?Java PluginManager.getPluginByClassName怎麽用?Java PluginManager.getPluginByClassName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.ide.plugins.PluginManager的用法示例。


在下文中一共展示了PluginManager.getPluginByClassName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: OpenCmsPluginConfigurationForm

import com.intellij.ide.plugins.PluginManager; //導入方法依賴的package包/類
/**
 * Creates a new project level configuration form and initializes listeners for form actions
 */
public OpenCmsPluginConfigurationForm() {
	formPanel.setVisible(false);
	enabledCheckBox.addActionListener(this);
	webappRoot.addFocusListener(this);
	defaultLocalVfsRoot.addFocusListener(this);
	moduleZipTargetFolderPath.addFocusListener(this);
	usePluginConnectorCheckBox.addActionListener(this);
	pullMetaDataCheckbox.addActionListener(this);

	if (pluginVersion == null) {
		PluginId pluginId = PluginManager.getPluginByClassName(OpenCmsPlugin.class.getName());
		IdeaPluginDescriptor pluginDescriptor = PluginManager.getPlugin(pluginId);
		if (pluginDescriptor != null) {
			pluginVersion = pluginDescriptor.getVersion();
		}
		if (pluginVersion == null) {
			pluginVersion = "unknown";
		}
	}
	pluginVersionLabel.setText("V " + pluginVersion);
}
 
開發者ID:mediaworx,項目名稱:opencms-intellijplugin,代碼行數:25,代碼來源:OpenCmsPluginConfigurationForm.java

示例2: getStateSpec

import com.intellij.ide.plugins.PluginManager; //導入方法依賴的package包/類
private static <T> State getStateSpec(@NotNull final PersistentStateComponent<T> persistentStateComponent) {
  final Class<? extends PersistentStateComponent> aClass = persistentStateComponent.getClass();
  final State stateSpec = aClass.getAnnotation(State.class);
  if (stateSpec == null) {
    final PluginId pluginId = PluginManager.getPluginByClassName(aClass.getName());
    if (pluginId != null) {
      throw new PluginException("No @State annotation found in " + aClass, pluginId);
    }
    throw new RuntimeException("No @State annotation found in " + aClass);
  }
  return stateSpec;
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:13,代碼來源:ComponentStoreImpl.java

示例3: addPluginIdByClassName

import com.intellij.ide.plugins.PluginManager; //導入方法依賴的package包/類
private static void addPluginIdByClassName(String className, Set<PluginId> pluginIds) {
  if (PluginManager.isPluginClass(className)) {
    PluginId pluginByClassName = PluginManager.getPluginByClassName(className);
    if (pluginByClassName == null) {
      return;
    }
    pluginIds.add(pluginByClassName);
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:10,代碼來源:IdeErrorsDialog.java

示例4: getSettingsPrefix

import com.intellij.ide.plugins.PluginManager; //導入方法依賴的package包/類
private static String getSettingsPrefix() {
  final PluginId pluginId = PluginManager.getPluginByClassName(MTTheme.class.getName());
  return pluginId == null ? "com.chrisrm.idea.MaterialThemeUI" : pluginId.getIdString();
}
 
開發者ID:ChrisRM,項目名稱:material-theme-jetbrains,代碼行數:5,代碼來源:MTThemeManager.java

示例5: getPluginPath

import com.intellij.ide.plugins.PluginManager; //導入方法依賴的package包/類
File getPluginPath() {
    final PluginId pluginId = PluginManager.getPluginByClassName(getClass().getName());
    final IdeaPluginDescriptor descriptor = PluginManager.getPlugin(pluginId);
    return descriptor.getPath();
}
 
開發者ID:ligasgr,項目名稱:intellij-xquery,代碼行數:6,代碼來源:XQueryRunnerClasspathEntryGenerator.java


注:本文中的com.intellij.ide.plugins.PluginManager.getPluginByClassName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。