Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.IScriptProject


    public void runTest() throws Throwable {
      final PhpModelAccess modelAccess = PhpModelAccess.getDefault();
      IProject project = getProject(map.get(PROJECT).toString());

      IScriptProject scriptProject = DLTKCore.create(project);
      final IDLTKSearchScope scope = SearchEngine
          .createSearchScope(scriptProject);
      modelAccess.findFields("", MatchRule.PREFIX, Modifiers.AccGlobal,
          0, scope, null);
      perfMonitor.execute(getProjectNameWithVersion(map)
View Full Code Here


    public void runTest() throws Throwable {
      final PhpModelAccess modelAccess = PhpModelAccess.getDefault();
      IProject project = getProject(map.get(PROJECT).toString());

      IScriptProject scriptProject = DLTKCore.create(project);
      final IDLTKSearchScope scope = SearchEngine
          .createSearchScope(scriptProject);
      modelAccess.findIncludes("", MatchRule.PREFIX, scope, null);
      perfMonitor.execute(getProjectNameWithVersion(map)
          + ".testSearchIncludeStatements", new Operation() {
View Full Code Here

    }

    public void runTest() throws Throwable {
      IProject project = getProject(map.get(PROJECT).toString());

      IScriptProject scriptProject = DLTKCore.create(project);
      final IDLTKSearchScope scope = SearchEngine
          .createSearchScope(scriptProject);
      final IType[] exceptionType = PhpModelAccess.getDefault()
          .findTypes(map.get(TYPE).toString(), MatchRule.EXACT, 0, 0,
              scope, null);
View Full Code Here

    }

    public void runTest() throws Throwable {
      IProject project = getProject(map.get(PROJECT).toString());

      IScriptProject scriptProject = DLTKCore.create(project);
      final IDLTKSearchScope scope = SearchEngine
          .createSearchScope(scriptProject);
      final IType[] exceptionType = PhpModelAccess.getDefault()
          .findTypes(map.get(TYPE).toString(), MatchRule.EXACT, 0, 0,
              scope, null);
View Full Code Here

        ExpressionConverter parser = ExpressionConverter.getDefault();
        Expression expression = parser.perform(children[0]);
        EvaluationContext evalContext = new EvaluationContext(null,
            cunit);
        evalContext.addVariable("compilationUnit", cunit); //$NON-NLS-1$
        IScriptProject javaProject = cunit.getScriptProject();
        String[] natures = javaProject.getProject().getDescription()
            .getNatureIds();
        evalContext.addVariable(
            "projectNatures", Arrays.asList(natures)); //$NON-NLS-1$
        // evalContext.addVariable("sourceLevel",
        // javaProject.getOption(JavaCore.COMPILER_SOURCE, true));
View Full Code Here

    assert (allFunctions.length > 0);
  }

  private IDLTKSearchScope createScope() {
    IScriptProject scriptProject = DLTKCore.create(project);

    IDLTKSearchScope scope = SearchEngine.createSearchScope(scriptProject);
    return scope;
  }
View Full Code Here

   * workspace
   */
  public IProjectFragment getProjectFragment(String projectName,
      String fragmentPath) throws ModelException {

    IScriptProject project = getScriptProject(projectName);
    if (project == null) {
      return null;
    }
    IPath path = new Path(fragmentPath);
    if (path.isAbsolute()) {
      IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace()
          .getRoot();
      IResource resource = workspaceRoot.findMember(path);
      IProjectFragment root;
      // resource in the workspace
      root = project.getProjectFragment(resource);
      return root;
    } else {
      IProjectFragment[] roots = project.getProjectFragments();
      if (roots == null || roots.length == 0) {
        return null;
      }
      for (int i = 0; i < roots.length; i++) {
        IProjectFragment root = roots[i];
View Full Code Here

                  .getAccessRules(accessibleFiles,
                      nonAccessibleFiles), true,
              new IBuildpathAttribute[0], false);
        }
        // set buildpath and output location
        IScriptProject scriptProject = DLTKCore.create(project);
        scriptProject.setRawBuildpath(entries, null);

        result[0] = scriptProject;
      }
    };
    getWorkspace().run(create, null);
View Full Code Here

  }

  private void setInputAsExplorerProject(IWorkbenchPart part) {
    final TreeSelection input = (TreeSelection) ((ScriptExplorerPart) part)
        .getTreeViewer().getSelection();
    IScriptProject scriptProject = null;
    // getting selected project (from ScriptExplorerPart selection.
    if (input.getFirstElement() instanceof IModelElement) {
      scriptProject = (IScriptProject) ((IModelElement) input
          .getFirstElement())
          .getAncestor(IModelElement.SCRIPT_PROJECT);
View Full Code Here

    TestSetup setup = new TestSetup(suite) {
      protected void setUp() throws Exception {
        deleteProject(map.get(PROJECT).toString());
        IProject project = getProject(map.get(PROJECT).toString());

        IScriptProject scriptProject = DLTKCore.create(project);
        project.create(null);
        project.open(null);

        // configure nature
        IProjectDescription desc = project.getDescription();
        desc.setNatureIds(new String[] { PHPNature.ID });
        project.setDescription(desc, null);
        ProjectOptions.setPhpVersion((PHPVersion) map.get(PHP_VERSION),
            project.getProject());
        IFolder testFolder = project.getFolder("pdttest");
        testFolder.create(true, true, null);

        if (map.get(CHANGE_INCLUDE_PATH) != null
            && ((Boolean) map.get(CHANGE_INCLUDE_PATH))
                .booleanValue()) {
          String[] includePath = (String[]) map.get(INCLUDE_PATH);
          IBuildpathEntry[] buildpathEntries = new IBuildpathEntry[includePath.length + 1];
          buildpathEntries[buildpathEntries.length - 1] = DLTKCore
              .newSourceEntry(testFolder.getFullPath());
          for (int i = 0; i < includePath.length; i++) {
            buildpathEntries[i] = DLTKCore.newSourceEntry(project
                .getFullPath().append(includePath[i]));
          }
          scriptProject.setRawBuildpath(buildpathEntries, null);
        }

        // Util.downloadAndExtract(map.get(URL).toString(),
        // scriptProject
        // .getProject().getLocation().toString());
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.IScriptProject

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.