本文整理匯總了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);
}
示例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;
}
示例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);
}
}
示例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();
}
示例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();
}