1 21 22 package org.armedbear.j; 23 24 import java.awt.Color ; 25 import java.awt.event.MouseEvent ; 26 import javax.swing.JPopupMenu ; 27 28 40 public interface Mode 41 { 42 49 public int getId(); 50 51 58 public String getDisplayName(); 59 60 public Buffer createBuffer(File file); 61 62 69 public Formatter getFormatter(Buffer buffer); 70 71 80 public KeyMap getKeyMap(); 81 82 92 public File getKeyMapFile(); 93 94 public void useDefaultKeyMap(); 95 96 public void deleteKeyMap(); 97 98 108 public String getMenuName(); 109 110 121 public MenuBar createMenuBar(Frame frame); 122 123 133 public void populateMenu(Editor editor, Menu menu); 134 135 public void populateModeMenu(Editor editor, Menu menu); 136 137 144 public JPopupMenu getContextMenu(Editor editor); 145 146 152 public ToolBar getToolBar(Frame frame); 153 154 163 public NavigationComponent getSidebarComponent(Editor editor); 164 165 177 public Tagger getTagger(SystemBuffer buffer); 178 179 188 public boolean isTaggable(); 189 190 198 public boolean hasQualifiedNames(); 199 200 207 public boolean isQualifiedName(String s); 208 209 220 public boolean canIndent(); 221 222 232 public boolean canIndentPaste(); 233 234 public boolean acceptsLinePaste(Editor editor); 235 236 249 public int getCorrectIndentation(Line line, Buffer buffer); 250 251 258 public SyntaxIterator getSyntaxIterator(Position pos); 259 260 268 public String getCommentStart(); 269 270 279 public String getCommentEnd(); 280 281 295 public boolean getBooleanProperty(Property property); 296 297 311 public int getIntegerProperty(Property property); 312 313 327 public String getStringProperty(Property property); 328 329 343 public Color getColorProperty(Property property); 344 345 public void setProperty(Property property, String value); 346 347 public void setProperty(Property property, boolean value); 348 349 public void setProperty(Property property, int value); 350 351 360 public boolean accepts(String filename); 361 362 373 public boolean isIdentifierStart(char c); 374 375 387 public boolean isIdentifierPart(char c); 388 389 399 public boolean isInQuote(Buffer buffer, Position pos); 400 401 410 public boolean isInComment(Buffer buffer, Position pos); 411 412 420 public boolean isCommentLine(Line line); 421 422 436 public char fixCase(Editor editor, char c); 437 438 446 public String getContextString(Editor editor, boolean verbose); 447 448 456 public String getMouseMovedContextString(Editor editor, Position pos); 457 458 466 public String getToolTipText(Editor editor, MouseEvent e); 467 468 480 public void loadFile(Buffer buffer, File file); 481 482 493 public boolean confirmClose(Editor editor, Buffer buffer); 494 495 503 public boolean isKeyword(String s); 504 505 517 public Expression getExpressionAtDot(Editor editor, boolean exact); 518 519 527 public String getIdentifier(Position pos); 528 529 538 public String getIdentifier(Line line, int offset); 539 540 551 public Position findIdentifierStart(Line line, int offset); 552 } 553 | Popular Tags |