Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.IScriptProject


            PHPStructuredEditor phpEditor = (PHPStructuredEditor) fTextEditor;
            IModelElement modelElement = phpEditor
                .getModelElement();

            if (modelElement != null) {
              IScriptProject scriptProject = modelElement
                  .getScriptProject();
              project = scriptProject.getProject();
              if (project != null
                  && project.isAccessible()
                  && project
                      .getNature(JavaScriptCore.NATURE_ID) == null) {
                hasJavaScriptNature = false;
View Full Code Here


  public boolean performFinish() {
    final String containerName = phpFileCreationWizardPage
        .getContainerName();
    final String fileName = phpFileCreationWizardPage.getFileName();
    newPhpTemplatesWizardPage.resetTableViewerInput();
    IScriptProject project = null;
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    IResource resource = root.findMember(new Path(containerName));
    if (!resource.exists() || !(resource instanceof IContainer)) {
      project = DLTKCore.create(resource.getProject());
    }
View Full Code Here

   */
  public void run() {
    Object object = fSelectedElements.get(0);
    if (object instanceof ExternalProjectFragment) {
      ExternalProjectFragment projFragment = (ExternalProjectFragment) object;
      IScriptProject scriptProject = projFragment.getScriptProject();
      try {
        BuildPathUtils.removeEntryFromBuildPath(scriptProject,
            projFragment.getBuildpathEntry());
      } catch (ModelException e) {
        Logger.logException("Could not remove buildPathEntry", e); //$NON-NLS-1$
View Full Code Here

        fSelectedElements.add(element);
        if (!(element instanceof IProjectFragment
            || element instanceof IScriptProject || element instanceof IncludePath))
          return false;
        if (element instanceof IScriptProject) {
          IScriptProject project = (IScriptProject) element;
          if (!BuildpathModifier.isSourceFolder(project)
              || BuildPathUtils.isInBuildpath(project.getPath(),
                  project))
            return false;
        } else if (element instanceof IProjectFragment) {
          IBuildpathEntry entry = ((IProjectFragment) element)
              .getRawBuildpathEntry();
View Full Code Here

   */
  protected IDLTKSearchScope createSearchScope() {
    // ISourceModule sourceModule = ((AbstractCompletionContext)
    // context)
    // .getSourceModule();
    IScriptProject scriptProject = sourceModule.getScriptProject();
    if (scriptProject != null) {
      return SearchEngine.createSearchScope(scriptProject);
    }
    IProjectFragment projectFragment = (IProjectFragment) sourceModule
        .getAncestor(IModelElement.PROJECT_FRAGMENT);
View Full Code Here

  @Override
  protected void updateProject(IProgressMonitor monitor)
      throws CoreException, InterruptedException {
    IProject projectHandle = fFirstPage.getProjectHandle();
    IScriptProject scriptProject = DLTKCore.create(projectHandle);
    if (scriptProject != null) {
      IBuildpathEntry[] rawBuildpath = new IBuildpathEntry[0];
      if (scriptProject.isOpen()) {
        rawBuildpath = scriptProject.getRawBuildpath();
      }
      init(scriptProject, rawBuildpath, true);
    } else {
      throw (new IllegalStateException());
    }
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

    result.runProtected(this, p);
  }

  public void setUpSuite() throws Exception {
    deleteProject(projectName);
    IScriptProject project = setUpScriptProject(projectName);
    ProjectOptions.setPhpVersion(phpVersion, project.getProject());
  }
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.findTypes("", MatchRule.PREFIX, 0, 0, scope, null);
      perfMonitor.execute(getProjectNameWithVersion(map)
          + ".testSearchAllTypes", new Operation() {
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.findMethods("", MatchRule.PREFIX, Modifiers.AccGlobal,
          0, scope, null);
      perfMonitor.execute(getProjectNameWithVersion(map)
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.