Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.QualifiedName


   
    IFile defaultTypeSystemFile = project.getFile(DEFAULT_TYPE_SYSTEM_PATH);
   
    String typeSystemLocation;
    try {
      typeSystemLocation = project.getPersistentProperty(new QualifiedName("", TYPE_SYSTEM_PROPERTY));
    } catch (CoreException e) {
      typeSystemLocation = null;
    }
   
    IFile typeSystemFile = null;
View Full Code Here


  }

  public static void setTypeSystemLocation(IProject project, String typeSystemLocation) {
   
    try {
      project.setPersistentProperty(new QualifiedName("", TYPE_SYSTEM_PROPERTY), typeSystemLocation);
    } catch (CoreException e) {
      CasEditorPlugin.log(e);
    }
  }
View Full Code Here

        if (store == null) {
          PreferenceStore newStore = new PreferenceStore();
          sessionPreferenceStores.put(getTypesystemId(element), newStore);
          newStore.addPropertyChangeListener(new SaveSessionPreferencesTrigger(element));

          String sessionPreferenceString = typeSystemFile.getPersistentProperty(new QualifiedName(
                  "", CAS_EDITOR_SESSION_PROPERTIES));

          if (sessionPreferenceString != null) {
            try {
              newStore.load(new ByteArrayInputStream(sessionPreferenceString.getBytes("UTF-8")));
View Full Code Here

      } catch (IOException e) {
        CasEditorIdePlugin.log(e);
      }

      try {
        tsFile.setPersistentProperty(new QualifiedName("", CAS_EDITOR_SESSION_PROPERTIES),
                new String(prefBytes.toByteArray(), "UTF-8"));
      } catch (CoreException e) {
        CasEditorIdePlugin.log(e);
      } catch (IOException e) {
        CasEditorIdePlugin.log(e);
View Full Code Here

        if (project.isOpen() && project.hasNature("org.apache.uima.caseditor.NLPProject")) {
         
          // if ts property is not set ...
          String typeSystemLocation;
          try {
            typeSystemLocation = project.getPersistentProperty(new QualifiedName("",
                TypeSystemLocationPropertyPage.TYPE_SYSTEM_PROPERTY));
          } catch (CoreException e) {
            typeSystemLocation = null;
          }
         
View Full Code Here

    XMLInputSource input = null;
    aeDescription = null;
    openingContext = true;
    try {
      try {
        contextFile = fileNeedingContext.getPersistentProperty(new QualifiedName(
                AbstractSection.PLUGIN_ID, AbstractSection.IMPORTABLE_PART_CONTEXT));
      } catch (CoreException e) {
        throw new InternalErrorCDE("unexpected exception", e);
      }
      ContextForPartDialog dialog = new ContextForPartDialog(PlatformUI.getWorkbench().getDisplay()
              .getShells()[0], // ok in Eclipse 3.0
              getFile().getProject().getParent(), thing, getFile().getLocation(), this, contextFile);
      dialog.setTitle("File specifying context for editing importable part");
      if (dialog.open() == Window.CANCEL)
        throw new MultilevelCancel();

      contextFile = dialog.contextPath;

      if (null == contextFile) {
        Utility
                .popMessage(
                        "Context Info",
                        "A context is required to edit this part.  However no context was supplied.  Editing will be cancelled",
                        Utility.INFORMATION);
        throw new MultilevelCancel();
      } else {
        try {
          input = new XMLInputSource(contextFile);
        } catch (IOException e) {
          showContextLoadFailureMessage(e, contextFile);
          throw new MultilevelCancel();
        }
        if (null != input)
          try {
            parseSource(input, contextFile, !PRESERVE_COMMENTS);
          } catch (PartInitException e) {
            showContextLoadFailureMessage(e, contextFile);
            throw new MultilevelCancel();
          }
      }
    } finally {
      openingContext = false;
    }
    if (null == aeDescription) {
      aeDescription = UIMAFramework.getResourceSpecifierFactory().createAnalysisEngineDescription();
    } else {
      try {
        file.setPersistentProperty(new QualifiedName(AbstractSection.PLUGIN_ID,
                AbstractSection.IMPORTABLE_PART_CONTEXT), contextFile);
      } catch (CoreException e) {
        Utility.popMessage("Unexpected Exception", "While loading Context"
                + getMessagesToRootCause(e), Utility.ERROR);
        throw new InternalErrorCDE("Unexpected Exception:" + getMessagesToRootCause(e), e);
View Full Code Here

      // check if the build state version number has changed since last session
      // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=98969)
      if (monitor != null)
        monitor.subTask(Messages.javamodel_getting_build_state_number);
      QualifiedName qName = new QualifiedName(JavaCore.PLUGIN_ID, "stateVersionNumber"); //$NON-NLS-1$
      IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
      String versionNumber = null;
      try {
        versionNumber = root.getPersistentProperty(qName);
      } catch (CoreException e) {
View Full Code Here

    }
 
  public void connectToXCDE(Object element) throws CoreException
  {
  //If this is an XCDE-linked file, fire the XCDE callbacks   
  if( element instanceof FileEditorInput && ((FileEditorInput)element).getFile().getPersistentProperty(new QualifiedName("org.eclipse.xcde", "linked")) != null
      && ((FileEditorInput)element).getFile().getPersistentProperty(new QualifiedName("org.eclipse.xcde", "linked")).equals("true") )
    {
    synchronized (callbacks)
      {   
     
      for (Iterator i = callbacks.iterator(); i.hasNext();)
View Full Code Here

 
  public void disconnectFromXCDE(Object element) throws CoreException
  {
  if( element instanceof FileEditorInput && ((FileEditorInput)element).getFile().exists() )
  {
  if( ((FileEditorInput)element).getFile().getPersistentProperty(new QualifiedName("org.eclipse.xcde", "linked")) != null
      && ((FileEditorInput)element).getFile().getPersistentProperty(new QualifiedName("org.eclipse.xcde", "linked")).equals("true") )
    {       
    synchronized (callbacks)
      {
      for (Iterator i = callbacks.iterator(); i.hasNext(); )
        ((ITextFileDocumentProviderCallbacks)i.next()).disconnect(this, element);
View Full Code Here

  {     
    // Upload the file to the server
    register.createDocumentAtLocation(localFile.getName(), localFile.getContents(true), localFile.getFullPath().removeLastSegments(1).toString() + "/", false);
   
    // Mark the file as linked
    localFile.setPersistentProperty(new QualifiedName("org.eclipse.xcde", "linked"), "true");
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.QualifiedName

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.