Examples of IFile


Examples of org.eclipse.core.resources.IFile

      messages.add(new Status(Status.ERROR, Plugin.PLUGIN_ID, "No design folder selected."));
    } else {
      WGADesignStructureHelper helper = new WGADesignStructureHelper(designRoot);
      IFolder html = helper.getTmlRoot().getFolder("html");
      if (html.exists()) {
        IFile outerLayoutFile = html.getFile(new Path(getOuterLayoutName() + ".tml"));
        if (outerLayoutFile.exists()) {
          messages.add(new Status(Status.ERROR, Plugin.PLUGIN_ID, "A module with name '" + outerLayoutName + "' already exists in '" + outerLayoutFile.getParent().getFullPath().toString() + "'."));   
        }
        IFile innerLayoutFile = html.getFile(new Path("inner").append(getInnerLayoutName() + ".tml"));
        if (innerLayoutFile.exists()) {
          messages.add(new Status(Status.ERROR, Plugin.PLUGIN_ID, "A module with name '" + innerLayoutName + "' already exists in '" + innerLayoutFile.getParent().getFullPath().toString() + "'."));   
        }
      }
    }
    return messages;
  }
View Full Code Here

Examples of org.eclipse.core.resources.IFile

    @Override
  protected void doSetInput(IEditorInput newInput) throws CoreException {
    super.doSetInput(newInput);
    if (getSite().getShell().isVisible()) {
        // check if design is compatible
        IFile input = getInputFile();
        if (input != null) {
            if (!WGADesignStructureHelper.isWGAVersionComplianceCompatible(input)) {
                MessageDialog.openWarning(getSite().getShell(), "Incompatible design version", "This design uses an incompatible compliance level. Please upgrade to the latest WDS version to work on this design with full feature support.");       
            }
        }
View Full Code Here

Examples of org.eclipse.core.resources.IFile

    super.editorSaved();
    validateAndMark();
  }

  protected void validateAndMark() {
      IFile file = getInputFile();
      if (file != null) {
        WGADesignResourceValidator.validate(file);
      }
  }
View Full Code Here

Examples of org.eclipse.core.resources.IFile

    return document;
  }
 
  protected IFile getInputFile() {
    IEditorInput editorInput = getEditorInput();
    IFile file = null;
    if (editorInput instanceof IFileEditorInput) {
      IFileEditorInput ife = (IFileEditorInput) getEditorInput();
      file = ife.getFile();
    }
    return file;
View Full Code Here

Examples of org.eclipse.core.resources.IFile

  public boolean performFinish() {

    if (_page != null) {
      try {         
          String header = Plugin.getDefault().getHeaderFileMap().get(Plugin.HEADER_TML_MODUL).getHeaderForProject(_page.getTargetContainer().getProject());     
        IFile portlet = WGADesignStructureHelper.createPortlet(_page.getModes(), _page.getPortletName(), (IFolder) _page.getTargetContainer(),header);
        WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), portlet.getParent().getFile(new Path("mode-view.tml")), ResourceIDs.EDITOR_TML);
        WorkbenchUtils.setNavigationViewSelection(new SingleStructuredSelection(portlet.getParent().getFile(new Path("mode-view.tml"))));
      } catch (CoreException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
View Full Code Here

Examples of org.eclipse.core.resources.IFile

      IContainer container =  (IContainer)selection.getFirstElement();     
      if(WGADesignStructureHelper.isValidPortletLocation((container))){
        _portletValidFolderSelected  = true;
      }
    }else if(selection.getFirstElement() instanceof IFile){
      IFile file = (IFile) selection.getFirstElement();
      if(WGADesignStructureHelper.isValidPortletLocation(file.getParent())){
        _portletValidFolderSelected   = 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.