コード例 #1
0
  @Override
  public void init(IEditorSite site, IEditorInput input) throws PartInitException {
    super.init(site, input);

    // Show the 'presentation' action set with the 'Toggle Block SelectionMode' and
    // 'Show Whitespace Characters' actions.
    IWorkbenchPage page = site.getPage();
    page.showActionSet("org.eclipse.ui.edit.text.actionSet.presentation");
  }
コード例 #2
0
  /**
   * {@inheritDoc}
   *
   * @see org.eclipse.ui.texteditor.AbstractTextEditor#init(org.eclipse.ui.IEditorSite,
   *     org.eclipse.ui.IEditorInput)
   */
  @Override
  public void init(IEditorSite site, IEditorInput input) throws PartInitException {
    ISharedTextColors colors = getSharedColors();
    IPreferenceStore preferenceStore = DFEditorActivator.getDefault().getPreferenceStore();
    DFPropFileConfiguration configuration = new DFPropFileConfiguration(colors, preferenceStore);
    setSourceViewerConfiguration(configuration);

    preferenceStore.addPropertyChangeListener(this);

    super.init(site, input);
  }
コード例 #3
0
 @Override
 public void init(IEditorSite site, IEditorInput input) throws PartInitException {
   super.init(site, input);
   listener =
       new IPropertyChangeListener() {
         public void propertyChange(PropertyChangeEvent event) {
           updateStyles();
         }
       };
   getStore().addPropertyChangeListener(listener);
 }