Examples of IScriptProject


Examples of org.eclipse.dltk.core.IScriptProject

    assertTrue(install.getId().startsWith(installId));
  }
 
 
  public static void setupDeeProject(IProject project, String libraryEntry) throws CoreException {
    IScriptProject dltkProj = DLTKCore.create(project);
    assertTrue(!dltkProj.exists());
    setupLangProject(project);
    assertTrue(dltkProj.exists());
   
    IBuildpathEntry entry = DLTKCore.newContainerEntry(
      ScriptRuntime.newDefaultInterpreterContainerPath().append(libraryEntry)   
    );
    dltkProj.setRawBuildpath(new IBuildpathEntry[] {entry}, null);
    assertNotNull(ScriptRuntime.getInterpreterInstall(dltkProj));
  }
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

      DubBundleChecker expMainBundle) throws ModelException, CoreException {
    expMainBundle.checkBundleDescription(dubBundle, true);
    testDubContainer(project, expMainBundle);

    DubBundleChecker[] deps = expMainBundle.deps;
    IScriptProject dubProject = DLTKCore.create(project);
    checkRawBuildpath(dubProject.getRawBuildpath(), expMainBundle.sourceFolders);
   
    checkResolvedBuildpath(dubProject.getResolvedBuildpath(false), expMainBundle.sourceFolders, deps);
   
    IMarker[] dubErrorMarkers = WorkspaceModelManager.getDubErrorMarkers(project);
    assertTrue(dubErrorMarkers.length == 0);
  }
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

  private String mode;

  @Override
  public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
    StringBuilder cmdline = new StringBuilder();
    IScriptProject proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(configuration);

    String mainScriptAttribute = configuration.getAttribute("mainScript", "");

    String encoding = proj.getProject().getDefaultCharset();
    String view = configuration.getAttribute(RutaLaunchConstants.VIEW, CAS.NAME_DEFAULT_SOFA);
    if (StringUtils.isBlank(view)) {
      view = CAS.NAME_DEFAULT_SOFA;
    }
    boolean recursive = configuration.getAttribute(RutaLaunchConstants.RECURSIVE, false);

    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();
    boolean addSDI = preferenceStore.getBoolean(RutaCorePreferences.ADD_SDI);

    IResource member = proj.getProject().findMember(mainScriptAttribute);
    IPath projectPath = proj.getResource().getLocation();
    IPath inputDirPath = projectPath.append(RutaProjectUtils.getDefaultInputLocation());
    IPath outputDirPath = projectPath.append(RutaProjectUtils.getDefaultOutputLocation());
    String engineDefaultMethod = RutaProjectUtils.getEngineDescriptorPath(member.getLocation(),
            proj.getProject()).toPortableString();
    String input = configuration.getAttribute(RutaLaunchConstants.INPUT_FOLDER,
            inputDirPath.toPortableString());
    if (StringUtils.isBlank(input)) {
      input = inputDirPath.toPortableString();
    }
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

  @Override
  public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {

    List<String> extendedClasspath = new ArrayList<String>();
    Collections.addAll(extendedClasspath, super.getClasspath(configuration));
    IScriptProject scriptProject = AbstractScriptLaunchConfigurationDelegate
            .getScriptProject(configuration);
    extendedClasspath.addAll(getClassPath(scriptProject));

    return extendedClasspath.toArray(new String[extendedClasspath.size()]);
  }
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

  @Override
  public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch,
          IProgressMonitor monitor) throws CoreException {
    this.mode = mode;
    IResource ouputFolder = null;
    IScriptProject proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(configuration);
    IPath projectPath = proj.getResource().getLocation();
    IPath outputDirPath = projectPath.append(RutaProjectUtils.getDefaultOutputLocation());
    String outputFolderPath = configuration.getAttribute(RutaLaunchConstants.ARG_OUTPUT_FOLDER, "");
    if (StringUtils.isBlank(outputFolderPath)) {
      outputFolderPath = configuration.getAttribute(RutaLaunchConstants.OUTPUT_FOLDER,
              outputDirPath.toPortableString());
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

  @Override
  public void doInitializeForm(ILaunchConfiguration config) {
    super.doInitializeForm(config);

    IScriptProject proj = null;
    try {
      proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(config);
    } catch (CoreException e) {
      RutaIdeUIPlugin.error(e);
    }
    String defaultInputLocation = RutaProjectUtils.getDefaultInputLocation();
    String defaultOutputLocation = RutaProjectUtils.getDefaultOutputLocation();
    IResource inputFolder = proj.getProject().findMember(defaultInputLocation);
    IResource outputFolder = proj.getProject().findMember(defaultOutputLocation);

    try {
      recursivelyButton.setSelection(config.getAttribute(RutaLaunchConstants.RECURSIVE, false));
    } catch (CoreException e) {
      recursivelyButton.setSelection(false);
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

  }

  @Override
  public void setDefaults(ILaunchConfigurationWorkingCopy config) {
    super.setDefaults(config);
    IScriptProject proj = null;
    try {
      proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(config);
    } catch (CoreException e) {
      RutaIdeUIPlugin.error(e);
    }
    String defaultInputLocation = RutaProjectUtils.getDefaultInputLocation();
    String defaultOutputLocation = RutaProjectUtils.getDefaultOutputLocation();
    IResource inputFolder = proj.getProject().findMember(defaultInputLocation);
    IResource outputFolder = proj.getProject().findMember(defaultOutputLocation);
    config.setAttribute(RutaLaunchConstants.RECURSIVE, false);
    config.setAttribute(RutaLaunchConstants.INPUT_FOLDER, inputFolder.getFullPath()
            .toPortableString());
    config.setAttribute(RutaLaunchConstants.OUTPUT_FOLDER, outputFolder.getFullPath()
            .toPortableString());
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

    IProblemReporter problemReporter = context.getProblemReporter();
    ISourceModule smod = context.getSourceModule();
    ISourceLineTracker linetracker = context.getLineTracker();
    RutaCheckerProblemFactory problemFactory = new RutaCheckerProblemFactory(smod.getElementName(), linetracker);
   
    IScriptProject scriptProject = smod.getScriptProject();
    IProject project = scriptProject.getProject();
    IProject[] referencedProjects = project.getReferencedProjects();
    List<IProject> listOfClosedProjects = new ArrayList<IProject>();
    for (IProject each : referencedProjects) {
      if(!each.isOpen()) {
        listOfClosedProjects.add(each);
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

  }

  public static void doRunImpl(InterpreterConfig config, ILaunch launch,
          IRutaInterpreterRunnerConfig iconfig, IProgressMonitor monitor) throws CoreException {
    String launchMode = launch.getLaunchMode();
    IScriptProject proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(launch
            .getLaunchConfiguration());

    IPath projectPath = proj.getResource().getLocation();
    IPath inputDirPath = projectPath.append(RutaProjectUtils.getDefaultInputLocation());
    IPath outputDirPath = projectPath.append(RutaProjectUtils.getDefaultOutputLocation());
    String engine = RutaProjectUtils.getEngineDescriptorPath(config.getScriptFilePath(),
            proj.getProject()).toPortableString();
    IPath rootPath = RutaProjectUtils.getDescriptorRootPath(proj.getProject());

    File inputDir = inputDirPath.makeAbsolute().toFile();
    File outputDir = outputDirPath.makeAbsolute().toFile();

    if (!inputDir.exists()) {
      inputDir.mkdirs();
      IFolder folder = proj.getProject().getFolder(RutaProjectUtils.getDefaultInputLocation());
      folder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
    }
    IFolder outputFolder = proj.getProject().getFolder(RutaProjectUtils.getDefaultOutputLocation());
    if (!outputDir.exists()) {
      outputDir.mkdirs();
      outputFolder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
    }
View Full Code Here

Examples of org.eclipse.dltk.core.IScriptProject

    String fileNameWithExtension = fileNameWithoutExtension + RutaEngine.SCRIPT_FILE_EXTENSION;
    ISourceModule sourceModule = null;
    boolean found = false;
    for (IFolder eachFolder : scriptFolders) {

      IScriptProject sp = DLTKCore.create(eachFolder.getProject());
      IScriptFolder[] scriptFolders2 = sp.getScriptFolders();
      for (IScriptFolder iScriptFolder : scriptFolders2) {
        sourceModule = iScriptFolder.getSourceModule(fileNameWithExtension);
        if (sourceModule.exists() && sourceModule.getResource() != null
                && sourceModule.getResource().exists()) {
          found = true;
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.