Exemple #1
0
 private void doPopup(java.awt.event.MouseEvent e) {
   javax.swing.JPopupMenu menu = new javax.swing.JPopupMenu();
   menu.add(new javax.swing.JMenuItem(Actions.COPY_ACTION()));
   Actions.COPY_ACTION().putValue(javax.swing.Action.NAME, i18n.apply("menu.edit.copy"));
   menu.add(new javax.swing.JMenuItem(Actions.CUT_ACTION()));
   Actions.CUT_ACTION().putValue(javax.swing.Action.NAME, i18n.apply("menu.edit.cut"));
   menu.add(new javax.swing.JMenuItem(Actions.PASTE_ACTION()));
   Actions.PASTE_ACTION().putValue(javax.swing.Action.NAME, i18n.apply("menu.edit.paste"));
   menu.addSeparator();
   menu.add(new javax.swing.JMenuItem(Actions.mouseQuickHelpAction(colorizer, i18n)));
   menu.show(this, e.getX(), e.getY());
 }
 public ChangeSetOpIterator advanceStatus(
     String className,
     String methodName,
     String from,
     Function1<IResource, JavaPadDocument> getDocument)
     throws JavaModelException {
   JavaPadDocument doc = getDocument.apply(project.findType(className).getUnderlyingResource());
   String to = STATUSES.get(STATUSES.indexOf(from) + 1);
   return doc.setAnnotation(
       new String[] {PACKAGE, from},
       new String[] {PACKAGE, to},
       className,
       methodName,
       new String[0]);
 }