コード例 #1
0
ファイル: T24BasicEditor.java プロジェクト: debabratahazra/DS
 /**
  * Needed for content assistant in the Text viewer. This ensures actions such as key press would
  * trigger content assistant
  */
 @SuppressWarnings("deprecation")
 protected void createActions() {
   super.createActions();
   ResourceBundle bundle = T24BasicPlugin.getDefault().getResourceBundle();
   String id = ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS;
   Action action = new ContentAssistAction(bundle, "ContentAssistProposal", this);
   action.setActionDefinitionId(id);
   setAction("ContentAssistProposal", action);
   this.markAsContentDependentAction(id, true);
   ResourceAction printAction =
       new TextOperationAction(bundle, "Editor.Print.", this, ITextOperationTarget.PRINT, true);
   String printid = IWorkbenchActionDefinitionIds.PRINT;
   printAction.setHelpContextId(IAbstractTextEditorHelpContextIds.PRINT_ACTION);
   printAction.setActionDefinitionId(printid);
   setAction(ITextEditorActionConstants.PRINT, new PrintActionDecorator(printAction));
   this.markAsContentDependentAction(printid, true);
 }
コード例 #2
0
ファイル: EclipseUtil.java プロジェクト: debabratahazra/DS
 /**
  * Returns the IPath pointing to where the plugin stores its state.
  *
  * @return
  */
 public static IPath getPluginStateLocation() {
   T24BasicPlugin plugin = T24BasicPlugin.getDefault();
   IPath stateLocation = plugin.getStateLocation();
   return stateLocation;
 }