Class JavaManipulation


  • public class JavaManipulation
    extends Object
    Central access point for the Java Manipulation plug-in (id "org.eclipse.jdt.core.manipulation").
    • Field Detail

      • ID_PLUGIN

        public static final String ID_PLUGIN
        The id of the Java Manipulation plug-in (value "org.eclipse.jdt.core.manipulation").
        See Also:
        Constant Field Values
    • Constructor Detail

      • JavaManipulation

        public JavaManipulation()
    • Method Detail

      • getPreferenceNodeId

        public static final String getPreferenceNodeId()
        Returns:
        The id of the preference node for some basic Java preferences. Generally this will be "org.eclipse.jdt.ui" but some environments may not have the 'org.eclipse.jdt.ui' bundle, so a different one can be set.
        Since:
        1.10
      • setPreferenceNodeId

        public static final void setPreferenceNodeId​(String id)
        Sets the preference node to be used for basic Java preferences. The client should set the value back to null when finished.
        Parameters:
        id - the Id to use for the preference node
        Since:
        1.10
      • getCodeTemplateStore

        public static final org.eclipse.text.templates.TemplateStoreCore getCodeTemplateStore()
        Since:
        1.11
      • setCodeTemplateStore

        public static final void setCodeTemplateStore​(org.eclipse.text.templates.TemplateStoreCore in)
        Since:
        1.11
      • getCodeTemplateContextRegistry

        public static final org.eclipse.text.templates.ContextTypeRegistry getCodeTemplateContextRegistry()
        Since:
        1.11
      • setCodeTemplateContextRegistry

        public static final void setCodeTemplateContextRegistry​(org.eclipse.text.templates.ContextTypeRegistry in)
        Since:
        1.11
      • getPreference

        public static String getPreference​(String key,
                                           IJavaProject project)
        Returns the value for the given key in the given context for the JDT UI plug-in.
        Parameters:
        key - The preference key
        project - The current context or null if no context is available and the workspace setting should be taken. Note that passing null should be avoided.
        Returns:
        Returns the current value for the string.
        Since:
        1.10