コード例 #1
0
 protected void createSystemFileContexts(InputContextManager manager, FileStoreEditorInput input) {
   try {
     IFileStore store = EFS.getStore(input.getURI());
     IEditorInput in = new FileStoreEditorInput(store);
     manager.putContext(in, new CategoryInputContext(this, in, true));
   } catch (CoreException e) {
     PDEPlugin.logException(e);
   }
 }
コード例 #2
0
 @Override
 protected void structureChanged(IFile file, boolean added) {
   // If a plugin.xml file has been added to the project the editor should update
   if (added && ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR.equalsIgnoreCase(file.getName())) {
     IProject project = getCommonProject();
     if (project == null || project.equals(file.getProject())) {
       monitorFile(file);
     }
   }
   super.structureChanged(file, added);
 }
コード例 #3
0
 @Override
 protected void fireContextChange(InputContext context, boolean added) {
   super.fireContextChange(context, added);
   if (context.getId().equals(BundleInputContext.CONTEXT_ID)) {
     if (added) // bundle arriving
     bundleAdded(context);
     else
       // bundle going away
       bundleRemoved(context);
   } else if (context.getId().equals(BuildInputContext.CONTEXT_ID)) {
     if (added) buildAdded(context);
     else buildRemoved(context);
   } else if (context.getId().equals(PluginInputContext.CONTEXT_ID)) {
     if (added) pluginAdded(context);
     else pluginRemoved(context);
   }
 }
コード例 #4
0
 private BundleInputContext getBundleContext() {
   InputContextManager manager = getPage().getPDEEditor().getContextManager();
   return (BundleInputContext) manager.findContext(BundleInputContext.CONTEXT_ID);
 }
コード例 #5
0
 protected void createStorageContexts(InputContextManager manager, IStorageEditorInput input) {
   manager.putContext(input, new CategoryInputContext(this, input, true));
 }
コード例 #6
0
 protected void createResourceContexts(InputContextManager manager, IFileEditorInput input) {
   manager.putContext(input, new CategoryInputContext(this, input, true));
   manager.monitorFile(input.getFile());
 }