Exemplo n.º 1
0
 /** Initializes the controls */
 void initialize() {
   IDialogSettings settings =
       ApiUIPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION);
   if (settings != null) {
     restoreTextSelection(REPORT_PATH_STATE, settings);
   }
 }
Exemplo n.º 2
0
 /** Saves the state of the widgets on the page */
 void saveWidgetState() {
   IDialogSettings rootsettings = ApiUIPlugin.getDefault().getDialogSettings();
   IDialogSettings settings = rootsettings.getSection(SETTINGS_SECTION);
   if (settings == null) {
     settings = rootsettings.addNewSection(SETTINGS_SECTION);
   }
   settings.put(REPORT_PATH_STATE, getValue());
 }
 /**
  * Determines if the specified completion applies to the current offset context in the document
  *
  * @param document
  * @param completiontext
  * @param offset
  * @return true if the completion applies, false otherwise
  */
 private boolean appliesToContext(
     IDocument document, String completiontext, int tokenstart, int length) {
   if (length > completiontext.length()) {
     return false;
   }
   try {
     String prefix = document.get(tokenstart, length);
     return prefix.equals(completiontext.substring(0, length));
   } catch (BadLocationException e) {
     ApiUIPlugin.log(e);
   }
   return false;
 }
 /*
  * (non-Javadoc)
  * @see org.eclipse.ui.IMarkerResolution2#getImage()
  */
 @Override
 public Image getImage() {
   return ApiUIPlugin.getSharedImage(IApiToolsConstants.IMG_ELCL_REMOVE);
 }