Package org.eclipse.jface.preference

Examples of org.eclipse.jface.preference.IPreferenceStore


  }

  public List<String> getWGALaunchVMArguments() {
    List<String> vmArgs = new ArrayList<String>();
   
    IPreferenceStore store = WGADesignerPlugin.getDefault().getPreferenceStore();
   
    vmArgs.add("-Xms" + store.getInt(PreferenceConstants.JAVA_MIN_HEAP_SIZE) + "m");
    vmArgs.add("-Xmx" + store.getInt(PreferenceConstants.JAVA_MAX_HEAP_SIZE) + "m");
    vmArgs.add("-XX:PermSize=" + store.getInt(PreferenceConstants.JAVA_MIN_PERMGEN_SIZE) + "m");
    vmArgs.add("-XX:MaxPermSize=" + store.getInt(PreferenceConstants.JAVA_MAX_PERMGEN_SIZE) + "m");
    String wgaBasePath = getWGABase().getLocation().toFile().getAbsolutePath();
    vmArgs.add("-Dde.innovationgate.wga.configpath=\"" + wgaBasePath + "\"");
    vmArgs.add("-Dde.innovationgate.wga.auth.folder=\"" + wgaBasePath + "\"");
    vmArgs.add("-Dde.innovationgate.wga.wfdefinitions=\"" + getWorkflowRoot().getLocation().toFile().getAbsolutePath() + "\"");
    vmArgs.add("-Dde.innovationgate.wga.hsql.root=\"" + getHsqlRoot().getLocation().toFile().getAbsolutePath() + "\"");

    vmArgs.add("-D" + WGAConfiguration.SYSPROP_DESIGN_ROOT + "=\"../designs\"");
    vmArgs.add("-Dde.innovationgate.wga.devplugins=\"" + _developerPluginsRoot.getLocation().toFile().getAbsolutePath() + "\"");

    int segmentCount = _wgaBase.getLocation().matchingFirstSegments(_luceneRoot.getLocation());
    vmArgs.add("-D" + WGAConfiguration.SYSPROP_LUCENE_ROOT + "=\"" + _luceneRoot.getLocation().removeFirstSegments(segmentCount) + "\"");
    vmArgs.add("-Dde.innovationgate.wga.tmlscript.debug=\"" + Boolean.toString(store.getBoolean(PreferenceConstants.TMLSCRIPT_DEBUG)) + "\"");
    WGADeployment deployment = WGADesignerPlugin.getDefault().getWGADeploymentManager().getDeployment(getWGADistributionName());
    if (deployment != null) {
      vmArgs.add("-Dde.innovationgate.wga.defaultplugins=\"" + deployment.getDefaultPluginsDir().getAbsolutePath() + "\"");
    }
View Full Code Here


public class TMLEditorPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

    public TMLEditorPreferences() {
        setDescription("This page allows the configuration of the TML Editor.");
        IPreferenceStore store = Plugin.getDefault().getPreferenceStore();
        setPreferenceStore(store);
    }
View Full Code Here

public class WGADesignerPrefPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

  public WGADesignerPrefPage() {
    super(FieldEditorPreferencePage.GRID);
    IPreferenceStore store = WGADesignerPlugin.getDefault().getPreferenceStore();
    setPreferenceStore(store);
    setDescription("This page allows the configuration of global runtime settings.");
  }
View Full Code Here

public class PreferenceInitializer extends AbstractPreferenceInitializer {

  public void initializeDefaultPreferences() {
    normalizeDesignTemplates();
    createDefaultDesignTemplates();
    IPreferenceStore store = WGADesignerPlugin.getDefault().getPreferenceStore();
   
    store.setDefault(PreferenceConstants.JAVA_DEBUG, false);
    store.setDefault(PreferenceConstants.TMLSCRIPT_DEBUG, false);
   
    store.setDefault(PreferenceConstants.JAVA_MIN_HEAP_SIZE, 128);
    store.setDefault(PreferenceConstants.JAVA_MAX_HEAP_SIZE, 256);
    store.setDefault(PreferenceConstants.JAVA_MIN_PERMGEN_SIZE, 64);
    store.setDefault(PreferenceConstants.JAVA_MAX_PERMGEN_SIZE, 128);
   
    store.setDefault(PreferenceConstants.JMX_PORT, 1557);
   
    store.setDefault(PreferenceConstants.TOMCAT_SERVER_PORT, 8005);
    store.setDefault(PreferenceConstants.TOMCAT_HTTP_PORT, 8080);
    store.setDefault(PreferenceConstants.TOMCAT_REDIRECT_PORT, 8443);
  }
View Full Code Here

      Map<String,String> variables = new HashMap<String,String>();
          variables.put("workspace_loc", runtime.getProject().getWorkspace().getRoot().getLocation().toFile().getAbsolutePath());
          variables.put("project_loc", runtime.getProject().getLocation().toFile().getAbsolutePath());
      variables.put("wga_appbase", wgaDeployment.getWebappDir().getAbsolutePath());
      variables.put("wga_workdir", wgaDeployment.getWorkDir().getAbsolutePath());
      IPreferenceStore store = WGADesignerPlugin.getDefault().getPreferenceStore();
      variables.put("tomcat_server_port", Integer.toString(store.getInt(PreferenceConstants.TOMCAT_SERVER_PORT)));
      variables.put("tomcat_http_port", Integer.toString(store.getInt(PreferenceConstants.TOMCAT_HTTP_PORT)));
      variables.put("tomcat_redirect_port", Integer.toString(store.getInt(PreferenceConstants.TOMCAT_REDIRECT_PORT)));
     
     
      File orgCatalinaBase = runtime.getCatalinaBase().getLocation().toFile();
      // create new temp catalinabase  directory
      File catalinaBase = new File(WGADesignerPlugin.getDefault().getStateLocation().toFile(), "tomcat_current");
      if (!catalinaBase.exists()) {
        catalinaBase.mkdir();
      }
      WGUtils.delTree(catalinaBase, false);     
      // copy current conf from workspace
      File tmpConf = new File(catalinaBase, "conf");
      WGUtils.copyDirContent(new File(orgCatalinaBase, "conf"), tmpConf);
      // copy current lib from workspace
      File tmpLib = new File(catalinaBase, "lib");
      WGUtils.copyDirContent(new File(orgCatalinaBase, "lib"), tmpLib);


      File orgServerXML = new File(orgCatalinaBase, "conf/server.xml");
      File serverXML = new File(tmpConf, "server.xml");
      FileUtils.copyWithVariableSubstitution(orgServerXML, serverXML, variables, VAR_PREFIX, VAR_SUFFIX);   
     
      StringBuffer programArguments = new StringBuffer();
      Iterator<String> prgArgs = getPrgArgs(START_COMMAND, serverXML).iterator();
      while (prgArgs.hasNext()) {
        programArguments.append(" " + prgArgs.next());
      }
     
     
      List<String> vmArgs = getVmArgs(_catalinaHome, catalinaBase, true);
     
      // B00005D9E
      vmArgs.add("-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false");
     
      // add wga startup arguments
      vmArgs.addAll(runtime.getWGALaunchVMArguments());
 
      Iterator<String> it = vmArgs.iterator();
      StringBuffer jvmArguments = new StringBuffer();
      while (it.hasNext()) {
        jvmArguments.append(" " + it.next());
      }

      IVMInstall vmInstall = WGAExecutionEnvironment.findVMInstallById(runtime.getConfiguration().getExecutionEnvironmentId());
      if (vmInstall == null) {
        vmInstall = JavaRuntime.getDefaultVMInstall();
      }
      List<IPath> classPath = getClasspath(_catalinaHome, vmInstall.getInstallLocation());
      String[] bootClasspath = new String[0];
           
      _tomcatInstance = VMRuntime.runVM("WGA Runtime", vmInstall, MAIN_CLASS, classPath, bootClasspath, jvmArguments.toString(), programArguments.toString(), store.getBoolean(PreferenceConstants.JAVA_DEBUG),  store.getBoolean(PreferenceConstants.JAVA_DEBUG), false);
      _currentRuntime = runtime;
           
      //notifyListeners(TomcatServerStateListener.STATE_RUNNING);
    }
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
   */
  public void initializeDefaultPreferences() {
    IPreferenceStore store = Activator.getDefault().getPreferenceStore();
    store.setDefault(PreferenceConstants.P_BOOLEAN, true);
    store.setDefault(PreferenceConstants.P_CHOICE, "choice2");
    store.setDefault(PreferenceConstants.P_STRING,
        "Default value");
  }
View Full Code Here

//        activateView();
    }

    private void initModes() {
        IPreferenceStore store = BytecodeOutlinePlugin.getDefault()
            .getPreferenceStore();
        modes.set(BCOConstants.F_LINK_VIEW_TO_EDITOR, store
            .getBoolean(BCOConstants.LINK_VIEW_TO_EDITOR));
        modes.set(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT, store
            .getBoolean(BCOConstants.SHOW_ONLY_SELECTED_ELEMENT));
        modes.set(BCOConstants.F_SHOW_RAW_BYTECODE, store
            .getBoolean(BCOConstants.SHOW_RAW_BYTECODE));
        modes.set(BCOConstants.F_SHOW_LINE_INFO, store
            .getBoolean(BCOConstants.SHOW_LINE_INFO));
        modes.set(BCOConstants.F_SHOW_VARIABLES, store
            .getBoolean(BCOConstants.SHOW_VARIABLES));
        modes.set(BCOConstants.F_SHOW_STACKMAP, store
            .getBoolean(BCOConstants.SHOW_STACKMAP));
        modes.set(BCOConstants.F_EXPAND_STACKMAP, store
            .getBoolean(BCOConstants.EXPAND_STACKMAP));
        modes.set(BCOConstants.F_SHOW_ASMIFIER_CODE, store
            .getBoolean(BCOConstants.SHOW_ASMIFIER_CODE));
        modes.set(BCOConstants.F_SHOW_ANALYZER, store
            .getBoolean(BCOConstants.SHOW_ANALYZER));
        modes.set(BCOConstants.F_SHOW_HEX_VALUES, store
            .getBoolean(BCOConstants.SHOW_HEX_VALUES));
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
     */
    public void initializeDefaultPreferences() {
        IPreferenceStore store = BytecodeOutlinePlugin.getDefault().getPreferenceStore();
        store.setDefault(BCOConstants.LINK_VIEW_TO_EDITOR, true);
        store.setDefault(BCOConstants.LINK_REF_VIEW_TO_EDITOR, true);

        store.setDefault(BCOConstants.SHOW_ONLY_SELECTED_ELEMENT, true);

        store.setDefault(BCOConstants.SHOW_RAW_BYTECODE, false);

        store.setDefault(BCOConstants.SHOW_ASMIFIER_CODE, false);
        store.setDefault(BCOConstants.DIFF_SHOW_ASMIFIER_CODE, false);

        store.setDefault(BCOConstants.SHOW_ANALYZER, false);

        store.setDefault(BCOConstants.SHOW_VARIABLES, true);
        store.setDefault(BCOConstants.DIFF_SHOW_VARIABLES, true);

        store.setDefault(BCOConstants.SHOW_LINE_INFO, true);
        store.setDefault(BCOConstants.DIFF_SHOW_LINE_INFO, true);

        store.setDefault(BCOConstants.SHOW_STACKMAP, true);
        store.setDefault(BCOConstants.DIFF_SHOW_STACKMAP, true);

        store.setDefault(BCOConstants.EXPAND_STACKMAP, false);
        store.setDefault(BCOConstants.DIFF_EXPAND_STACKMAP, false);

        store.setDefault(BCOConstants.RECALCULATE_STACKMAP, false);
        store.setDefault(BCOConstants.SHOW_HEX_VALUES, false);
    }
View Full Code Here

        }
        return new TypedElement(name, methodName, TypedElement.TYPE_BYTECODE, javaElement, modes);
    }

    private BitSet getModes() {
        IPreferenceStore store = BytecodeOutlinePlugin.getDefault().getPreferenceStore();
        BitSet modes = new BitSet();
        modes.set(BCOConstants.F_LINK_VIEW_TO_EDITOR, store.getBoolean(BCOConstants.LINK_VIEW_TO_EDITOR));
        modes.set(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT, store.getBoolean(BCOConstants.SHOW_ONLY_SELECTED_ELEMENT));
        modes.set(BCOConstants.F_SHOW_RAW_BYTECODE, store.getBoolean(BCOConstants.SHOW_RAW_BYTECODE));
        modes.set(BCOConstants.F_SHOW_LINE_INFO, store.getBoolean(BCOConstants.DIFF_SHOW_LINE_INFO));
        modes.set(BCOConstants.F_SHOW_VARIABLES, store.getBoolean(BCOConstants.DIFF_SHOW_VARIABLES));
        modes.set(BCOConstants.F_SHOW_ASMIFIER_CODE, store.getBoolean(BCOConstants.DIFF_SHOW_ASMIFIER_CODE));
        modes.set(BCOConstants.F_SHOW_ANALYZER, store.getBoolean(BCOConstants.SHOW_ANALYZER));
        modes.set(BCOConstants.F_SHOW_STACKMAP, store.getBoolean(BCOConstants.DIFF_SHOW_STACKMAP));
        modes.set(BCOConstants.F_EXPAND_STACKMAP, store.getBoolean(BCOConstants.DIFF_EXPAND_STACKMAP));
        return modes;
    }
View Full Code Here

    public DefaultToggleAction(final String id, final boolean addPreferenceListener) {
        super();
        setId(id);
        init();

        IPreferenceStore prefStore = BytecodeOutlinePlugin.getDefault().getPreferenceStore();

        boolean isChecked = prefStore.getBoolean(id);
        setChecked(isChecked);
        if(addPreferenceListener) {
            this.store = prefStore;
            prefStore.addPropertyChangeListener(this);
        } else {
            this.store = null;
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.preference.IPreferenceStore

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.