Examples of RutaIdeUIPlugin


Examples of org.apache.uima.ruta.ide.RutaIdeUIPlugin

    return extendedClasspath.toArray(new String[extendedClasspath.size()]);
  }

  public static List<String> getClassPath(IScriptProject project) throws CoreException {
    RutaIdeUIPlugin d = RutaIdeUIPlugin.getDefault();
    List<String> extendedClasspath = new ArrayList<String>();

    // Normal mode, add the launcher plugin and uima runtime jar to the classpath
    try {
      if (!Platform.inDevelopmentMode()) {
        // Add this plugin jar to the classpath
        extendedClasspath.add(d.pluginIdToJarPath(RutaIdeUIPlugin.PLUGIN_ID));
      } else {
        extendedClasspath.add(d.pluginIdToJarPath(RutaIdeUIPlugin.PLUGIN_ID) + "target/classes");
      }

      // uima
      Bundle bundle = RutaIdeUIPlugin.getDefault().getBundle("org.apache.uima.runtime");
      if (bundle != null) {
        Enumeration<?> jarEnum = bundle.findEntries("/", "uimaj-core*.jar",
                Platform.inDevelopmentMode());
        while (jarEnum != null && jarEnum.hasMoreElements()) {
          URL element = (URL) jarEnum.nextElement();
          extendedClasspath.add(FileLocator.toFileURL(element).getFile());
        }
      }
      extendedClasspath.add(d.pluginIdToJarPath("org.apache.uima.runtime"));

      // ruta
      bundle = RutaIdeUIPlugin.getDefault().getBundle("org.apache.uima.ruta.engine");
      if (bundle != null) {
        Enumeration<?> jarEnum = bundle.findEntries("/", "*.jar", Platform.inDevelopmentMode());
        while (jarEnum != null && jarEnum.hasMoreElements()) {
          URL element = (URL) jarEnum.nextElement();
          extendedClasspath.add(FileLocator.toFileURL(element).getFile());
        }
      }
      extendedClasspath.add(d.pluginIdToJarPath("org.apache.uima.ruta.engine"));
    } catch (IOException e) {
      throw new CoreException(new Status(IStatus.ERROR, RutaIdeUIPlugin.PLUGIN_ID, IStatus.OK,
              "Failed to compose classpath!", e));
    }
   
View Full Code Here

Examples of org.apache.uima.ruta.ide.RutaIdeUIPlugin

    extendedClasspath.addAll(extensions);
    return extendedClasspath;
  }

  private static Collection<String> getExtensions() throws CoreException {
    RutaIdeUIPlugin d = RutaIdeUIPlugin.getDefault();
    Collection<String> result = new TreeSet<String>();
    IExtension[] extensions = null;
    extensions = Platform.getExtensionRegistry()
            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "actionExtension").getExtensions();
    extensionToClassPath(d, result, extensions);
View Full Code Here

Examples of org.apache.uima.ruta.ide.RutaIdeUIPlugin

import org.eclipse.jface.preference.IPreferenceStore;

public class RutaFormatterPreferenceInitializer extends AbstractPreferenceInitializer {

  public void initializeDefaultPreferences() {
    RutaIdeUIPlugin plugin = RutaIdeUIPlugin.getDefault();
    IPreferenceStore store = plugin.getPreferenceStore();

    store.setDefault(RutaFormatterConstants.INDENT_BLOCK, true);
    store.setDefault(RutaFormatterConstants.INDENT_STRUCTURE, true);

    store.setDefault(RutaFormatterConstants.LINES_BEFORE_LONG_DECLARATIONS, 1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.