Package q_impress.pmi.lib.project

Examples of q_impress.pmi.lib.project.IResource


        LoadingService loadingService = new LoadingService();
        loadingService.setInStream(stream);
        try {
          loadingService.initialize();
          loadingService.invoke();
          IResource prj = loadingService.getLoadedResource();
          int a = 1;
          a++;
        } catch (ServiceException e) {
          e.printStackTrace();
          assertTrue(false);
View Full Code Here


      @Override
      public void widgetSelected(SelectionEvent e) {
        IStructuredSelection selection = (IStructuredSelection) resourcesTreeViewer.getSelection();
        for (Object element : selection.toList()) {
          if (element instanceof IResource) {
            IResource res = (IResource) element;
            try {
              res.getParent().removeResource(res.getId());
            } catch (ResourceException e1) {
              ErrorDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
                  "Resource Deletion", "Resource deletion failed", new Status(IStatus.ERROR, "q_impress", e1.getMessage(), e1));
            }
          }
View Full Code Here

    resourceNameText.setLayoutData(gd);
    resourceNameText.addModifyListener(new ModifyListener(){
      @Override
      public void modifyText(ModifyEvent e) {
        if (resourceNameText.isFocusControl()) {
          IResource res = getSelectedResource();
          if (res != null) {
            res.setName(resourceNameText.getText());
            resourcesListSectionPart.markStale();
            resourceSectionPart.markDirty();
          }
        }
      }
View Full Code Here

      }
    });
  }
 
  private void refreshOverviewContent() {
    IResource res = getSelectedResource();
    if (res != null) {
      resourceNameText.setText(res.getName());
      resourceTypeText.setText(res.getClass().getSimpleName());
      if (res instanceof ExternalResource) {
        String location = ((ExternalResource)res).getLocation();
        if (location == null) location = "";
        resourceLocationText.setText(location);
        resourceLocationBrowseButton.setEnabled(true);
View Full Code Here

      service.setInStream(inStream);
      service.setLocationSolver(new WorkspaceLocationSolver());
      service.initialize();
      service.invoke();
     
      IResource loadedRes = service.getLoadedResource();
      if (!(loadedRes instanceof ModelingProject)) throw new PartInitException(new Status(IStatus.ERROR, "q_impress", "Invalid input for editor."));
      else {
        this.setInput(new ModelingProjectEditorInput((ModelingProject) loadedRes, this.originalInput));
        this.projectInput = (ModelingProjectEditorInput) this.getEditorInput();
      }
View Full Code Here

TOP

Related Classes of q_impress.pmi.lib.project.IResource

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.