Esempio n. 1
0
  @Override
  public void run() {
    if (canEdit()) {
      Runnable longJob =
          new Runnable() {

            public void run() {
              Object element = getStructuredSelection().getFirstElement();
              if (element instanceof MakeTarget) {
                MakeTargetDialog<MakeTarget> dialog =
                    new MakeTargetDialog.StandardMakeTargetDialog(shell, (MakeTarget) element);
                dialog.openMakeTargetDialog();
              } else if (element instanceof IProject) {
                try {
                  ProjectTOS tos = TinyOSPlugin.getDefault().getProjectTOS((IProject) element);
                  if (tos != null) {
                    MakeTargetDialog<MakeTargetSkeleton> dialog =
                        new MakeTargetDialog.ProjectDefaultsMakeTargetDialog(shell, tos);
                    dialog.openMakeTargetDialog();
                  }
                } catch (MissingNatureException ex) {
                  TinyOSCore.inform("edit make-option", ex);
                }
              }
            };
          };

      BusyIndicator.showWhile(TinyOSPlugin.getStandardDisplay(), longJob);
    }
  }
Esempio n. 2
0
  @Override
  public void run() {
    super.run();
    Set<MakeTarget> targets = getSelection();
    MakeTargetManager manager = TinyOSPlugin.getDefault().getTargetManager();

    for (MakeTarget target : targets) {
      manager.removeTarget(target);
    }
  }
  @Override
  public void initializeDefaultPreferences() {
    IPreferenceStore store = TinyOSPlugin.getDefault().getPreferenceStore();

    TextAttributeConstants.writeDefaults(store);

    // Bracket Highlight
    store.setDefault(PreferenceConstants.BRACKET_HIGHLIGHT, true);
    store.setDefault(PreferenceConstants.BRACKET_HIGHLIGHT_COLOR, "0,0,0");

    // Line Highlight
    store.setDefault(PreferenceConstants.CURRENT_LINE_HIGHLIGHT, true);
    store.setDefault(PreferenceConstants.CURRENT_LINE_HIGHLIGHT_COLOR, "247,231,121");

    // BracketBackround
    store.setDefault(PreferenceConstants.BRACKET_BG_COLORER, true);
    store.setDefault(PreferenceConstants.BRACKET_BG_START_COLOR, "255,255,255");
    store.setDefault(PreferenceConstants.BRACKET_BG_INCREMENT, "15,15,15");
    store.setDefault(PreferenceConstants.BRACKET_BG_ERROR_COLOR, "247,198,198");

    // Modify Outside Files
    store.setDefault(PreferenceConstants.ENABLE_MODIFY_ON_OUTSIDE_FILES, false);

    // General
    store.setDefault(PreferenceConstants.USE_TABS, true);
    store.setDefault(PreferenceConstants.SPACES_AS_TABS, 2);
    store.setDefault(PreferenceConstants.CLEAN_FULL, true);
    store.setDefault(PreferenceConstants.THUMBNAIL_POPUP, true);
    store.setDefault(PreferenceConstants.OUTLINE_UPDATE_DELAY, 500);
    store.setDefault(PreferenceConstants.ICONS_ALWAYS_DECORATED, true);

    // Code help
    store.setDefault(PreferenceConstants.AUTO_BRACKETS, true);
    store.setDefault(PreferenceConstants.AUTO_STRATEGY_IDENT, true);
    store.setDefault(PreferenceConstants.ERROR_TO_INFO, true);

    store.setDefault(PreferenceConstants.SAVE_FILES_AUTOMATICALLY, false);

    store.setDefault(PreferenceConstants.PROJECT_CACHE, "tinyos.yeti.core.cache.compressed");
  }