Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Plugin


    }
    return initializer;
  }

  private static ClasspathContainerInitializer computeClasspathContainerInitializer(String containerID) {
    Plugin jdtCorePlugin = JavaCore.getPlugin();
    if (jdtCorePlugin == null) return null;

    IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager.CPCONTAINER_INITIALIZER_EXTPOINT_ID);
    if (extension != null) {
      IExtension[] extensions =  extension.getExtensions();
View Full Code Here


   * none was found.
   * @since 2.1
    */
  public static ClasspathVariableInitializer getClasspathVariableInitializer(String variable){

    Plugin jdtCorePlugin = JavaCore.getPlugin();
    if (jdtCorePlugin == null) return null;

    IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager.CPVARIABLE_INITIALIZER_EXTPOINT_ID);
    if (extension != null) {
      IExtension[] extensions =  extension.getExtensions();
View Full Code Here

   *
   * @deprecated Marked deprecated to supress warnings. This class is added to support
   * backward compatibility only and should not be used in any new code.
   */
  public Object init(Object object, String name) {
    Plugin plugin = null;
    if (object instanceof Plugin)
      plugin = (Plugin) object;
    // No extension exists. Get the plug-in object and call #initializeDefaultPluginPreferences().
    // We can only call this if the runtime compatibility layer is installed.
    if (plugin == null && InternalPlatform.getDefault().getBundle(org.eclipse.core.internal.runtime.CompatibilityHelper.PI_RUNTIME_COMPATIBILITY) != null)
      plugin = Platform.getPlugin(name);
    if (plugin == null) {
      if (InternalPlatform.DEBUG_PLUGIN_PREFERENCES)
        InternalPlatform.message("No plug-in object available to set plug-in default preference overrides for:" + name); //$NON-NLS-1$
      return null;
    }
    if (InternalPlatform.DEBUG_PLUGIN_PREFERENCES)
      InternalPlatform.message("Applying plug-in default preference overrides for plug-in: " + plugin.getDescriptor().getUniqueIdentifier()); //$NON-NLS-1$

    plugin.internalInitializeDefaultPluginPreferences();
    return plugin;
  }
View Full Code Here

    }
    return initializer;
  }

  private static ClasspathContainerInitializer computeClasspathContainerInitializer(String containerID) {
    Plugin jdtCorePlugin = JavaCore.getPlugin();
    if (jdtCorePlugin == null) return null;

    IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager.CPCONTAINER_INITIALIZER_EXTPOINT_ID);
    if (extension != null) {
      IExtension[] extensions =  extension.getExtensions();
View Full Code Here

    if (variablePath != null && variablePath != JavaModelManager.VARIABLE_INITIALIZATION_IN_PROGRESS) {
      return null;
    }

    // Search for extension point to get the possible deprecation message
    Plugin jdtCorePlugin = JavaCore.getPlugin();
    if (jdtCorePlugin == null) return null;

    IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager.CPVARIABLE_INITIALIZER_EXTPOINT_ID);
    if (extension != null) {
      IExtension[] extensions =  extension.getExtensions();
View Full Code Here

   * none was found.
   * @since 2.1
    */
  public static ClasspathVariableInitializer getClasspathVariableInitializer(String variable){

    Plugin jdtCorePlugin = JavaCore.getPlugin();
    if (jdtCorePlugin == null) return null;

    IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager.CPVARIABLE_INITIALIZER_EXTPOINT_ID);
    if (extension != null) {
      IExtension[] extensions =  extension.getExtensions();
View Full Code Here

   */
  public TextEditorPreferencePage() {
    super(GRID);

    setDescription(TextEditorMessages.PreferencePage_description);
    Plugin plugin= Platform.getPlugin("org.eclipse.ui.workbench"); //$NON-NLS-1$
    if (plugin instanceof AbstractUIPlugin) {
      AbstractUIPlugin uiPlugin= (AbstractUIPlugin) plugin;
      setPreferenceStore(uiPlugin.getPreferenceStore());
    }
  }
View Full Code Here

   *
   * @param target the target preference store
   * @param targetKey the key to be used in the target preference store
   */
  public static void startPropagate(IPreferenceStore target, String targetKey) {
    Plugin plugin= Platform.getPlugin("org.eclipse.ui.workbench"); //$NON-NLS-1$
    if (plugin instanceof AbstractUIPlugin) {
      AbstractUIPlugin uiPlugin= (AbstractUIPlugin) plugin;
      IPreferenceStore store= uiPlugin.getPreferenceStore();
      if (store != null)
        PropagatingFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT, target, targetKey);
View Full Code Here

    this.menu = menu;
  }
 
  public void addRecentFile(String fileName, String menuID, String recentMenuID, String recentFilesKey, String menuLabel, PropertyChangeListener listener) {
   
    Plugin plugin = Activator.getDefault();
    Preferences prefs = plugin.getPluginPreferences();

    String recentFiles = prefs.getString(recentFilesKey);

    if (recentFiles == null) {
      recentFiles = "";
    }

    String[] recentFilesArray = recentFiles.split(";");
    String[] newFilesArray = new String[10];

    // put new file
    newFilesArray[0] = fileName;

    // move files
    for (int i = 0; i < 9; i++) {

      // check files
      if (i >= recentFilesArray.length) {
        break;
      }

      // check if file has not been already added
      if (!fileName.equals(recentFilesArray[i])) {
        newFilesArray[i + 1] = recentFilesArray[i];
      }
    }

    // now join
    recentFiles = "";
    for (String file : newFilesArray) {
      if (file != null && file != "") {
        recentFiles += file + ";";
      }
    }

    // store preference
    prefs.setValue(recentFilesKey, recentFiles);
    plugin.savePluginPreferences();
   
    // rebuild menu
    rebuildRecentFiles(menuID, recentMenuID, recentFilesKey, menuLabel, listener);
  }
View Full Code Here

    fileMenu.insert(fileMenu.getSize() - 1, viewMenu);
   
  }

  public String[] getRecentFiles(String recentFilesKey) {
    Plugin plugin = Activator.getDefault();
    Preferences prefs = plugin.getPluginPreferences();

    String recentFiles = prefs.getString(recentFilesKey);

    return recentFiles.split(";");
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.Plugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.