Examples of IVirtualComponent


Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

        && url.endsWith(IFileFolderConstants.DOT
            + IFileFolderConstants.EXT_JSP)) {
      String urlPattern = ""; //$NON-NLS-1$
      IVirtualResource[] resources = ComponentCore
          .createResources(openedFile);
      IVirtualComponent component = null;
      if (resources[0] != null) {
        component = resources[0].getComponent();
      }
      if (component != null) {
        urlPattern = WebDeployableArtifactUtil.getServletMapping(
            openedFile.getProject(), true, FACES_SERVLET_NAME,
            component.getName());
      }
      if (urlPattern.lastIndexOf(IFileFolderConstants.DOT) != -1) {
        String extension = urlPattern.substring(urlPattern
            .lastIndexOf(IFileFolderConstants.DOT));
        url = url.substring(0, url.lastIndexOf(IFileFolderConstants.DOT
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

   
  }

  public static void createModuleEntry(IProject project, String moduleName) throws CoreException {
   
    IVirtualComponent component = ComponentCore.createComponent(project);
    IVirtualFolder folder = component.getRootFolder().getFolder("/");
    IContainer[] underlyingFolders = folder.getUnderlyingFolders();
    IResource[] underlyingResources = folder.getUnderlyingResources();
    IVirtualResource[] members = folder.members();
//    IVirtualResource[] members = folder.members();
//    IVirtualFolder folder2 = folder.getFolder(new Path(getGwtOutputFolder()).append(moduleName));
//    IContainer[] underlyingFolders = folder.getUnderlyingFolders();
    IVirtualFolder moduleOutputFolder = component.getRootFolder().getFolder("/")//$NON-NLS-1$
    moduleOutputFolder.createLink(new Path(getGwtOutputFolder()).append(moduleName), IResource.FORCE, null);
   
  }
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

        .getProject(projName);
   
    String webFolder = getWebContentFolderName();
    if (proj.exists()) {
      //Bug 330819 - Project Properties - Facets - Change Configuration - Receive npe error
      IVirtualComponent virtComponent = ComponentCore.createComponent(proj);
      if (virtComponent != null) {
        IVirtualFolder virtFolder = virtComponent.getRootFolder();
        if (virtFolder != null) {
          IContainer container = virtFolder.getUnderlyingFolder();
          if (container != null) {
            webContentPath = container.getRawLocation();
          }
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

  private String getWebContentFolderName() {
    String projName = (String)getProperty(FACET_PROJECT_NAME);
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projName);
    if (project.exists()){
      //Bug 330819 - Project Properties - Facets - Change Configuration - Receive npe error
      IVirtualComponent virtComponent = ComponentCore.createComponent(project);
      if (virtComponent != null) {
        IVirtualFolder virtFolder = virtComponent.getRootFolder();
        if (virtFolder != null) {
          IContainer container = virtFolder.getUnderlyingFolder();
          if (container != null) {
            IPath webContentPath = container.getProjectRelativePath();
            return webContentPath.toString();
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

    if (!ModuleCoreNature.isFlexibleProject(project))
      return null;

    IPath path = null;
    IVirtualComponent component = ComponentCore.createComponent(project);
    if (component != null && component.exists()) {
      path = component.getRootFolder().getWorkspaceRelativePath();
    }
    return path;
  }
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

    if (!ModuleCoreNature.isFlexibleProject(project))
      return null;

    IPath path = null;
    IVirtualComponent component = ComponentCore.createComponent(project);
    if (component != null && component.exists()) {
      path = component.getRootFolder().getWorkspaceRelativePath();
    }
    return path;
  }
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

    try {

      monitor.beginTask("", 1)

      IVirtualComponent component = ComponentCore.createComponent(compilationUnit.getJavaProject().getProject());
      WebArtifactEdit artifactEdit = WebArtifactEdit.getWebArtifactEditForWrite(component);
      WebApp webApp = (WebApp) artifactEdit.getContentModelRoot();
      EList servlets = webApp.getServlets();
      for (Iterator i = servlets.iterator(); i.hasNext();) {
        Servlet servlet = (Servlet) i.next();
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

    return getURIFromPath(p.makeAbsolute().makeRelativeTo(webContentPath.makeAbsolute()));   
  }

  private static String getTagDirURI(TLDDocument doc, IProject project) {
    Path p = new Path(doc.getBaseLocation());
    IVirtualComponent projectComp = ComponentCore.createComponent(project);
   
    if (projectComp != null)
    {
        IVirtualFolder rootFolder = projectComp.getRootFolder();
       
        if (rootFolder != null)
        {
            IPath webContentPath =
                rootFolder.getUnderlyingFolder().getFullPath();
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

    if (!ModuleCoreNature.isFlexibleProject(project))
      return null;

    IPath path = null;
    IVirtualComponent component = ComponentCore.createComponent(project);
    if (component != null && component.exists()) {
      path = component.getRootFolder().getWorkspaceRelativePath();
    }
    return path;
  }
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.resources.IVirtualComponent

    value = value.replaceAll("\"", """);
    return value;
  }

  public static boolean isClickProject(IProject project){
    IVirtualComponent component = ComponentCore.createComponent(project);
    try {
      if(WebArtifactEdit.isValidWebModule(component)){
        IFacetedProject facetedProject = ProjectFacetsManager.create(project);
        Object facets[] = facetedProject.getProjectFacets().toArray();
        for(int i=0;i<facets.length;i++){
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.