private ViewFactory viewFactory = new ViewFactory() { public View makeView() { LayoutInflater inflater = LayoutInflater.from(TextSwitcherTest.this); TextView textView = (TextView) inflater.inflate(R.layout.textView, null); return textView; } };
/** * Returns number of line currently selected in editor or <code>-1</code>. * * @return number of line currently selected in editor or <code>-1</code> */ @Override public int getCurrentLineNumber () { return contextDispatcher.getCurrentLineNumber(); }
/** * Returns URL of source currently selected in editor or empty string. * * @return URL of source currently selected in editor or empty string */ @Override public String getCurrentURL() { return contextDispatcher.getCurrentURLAsString(); }
public static FileObject getCurrentFile() { return EditorContextDispatcher.getDefault().getCurrentFile(); }
public static void addPropertyChangeListener (PropertyChangeListener l) { //getContext ().addPropertyChangeListener (l); EditorContextDispatcher.getDefault().addPropertyChangeListener("text/x-jsp", l); EditorContextDispatcher.getDefault().addPropertyChangeListener("text/x-tag", l); }
public static void removePropertyChangeListener (PropertyChangeListener l) { //getContext ().removePropertyChangeListener (l); EditorContextDispatcher.getDefault().removePropertyChangeListener(l); }
/** throws IllegalComponentStateException when can not return the data in AWT. */ private String getCurrentElement(final ElementKind kind, final String[] elementSignaturePtr) throws java.awt.IllegalComponentStateException { return getCurrentElement(contextDispatcher.getCurrentFile(), contextDispatcher.getCurrentEditor(), kind, elementSignaturePtr); }
public static void addPropertyChangeListener(PropertyChangeListener l) { contextDispatcher.addPropertyChangeListener(MIMENames.C_MIME_TYPE, l); contextDispatcher.addPropertyChangeListener(MIMENames.CPLUSPLUS_MIME_TYPE, l); contextDispatcher.addPropertyChangeListener(MIMENames.HEADER_MIME_TYPE, l); contextDispatcher.addPropertyChangeListener(MIMENames.ASM_MIME_TYPE, l); contextDispatcher.addPropertyChangeListener(MIMENames.FORTRAN_MIME_TYPE, l); } }
public static FileObject getCurrentFileObject() { return contextDispatcher.getMostRecentFile(); }
public static int getCurrentLineNumber() { return contextDispatcher.getMostRecentLineNumber(); }
public static String getCurrentURL() { return contextDispatcher.getMostRecentURLAsString(); }
void startListening () { Controller controller = panel.getController (); if (controller == null) return; controller.addPropertyChangeListener (this); }
public static FileObject getCurrentFile() { return EditorContextDispatcher.getDefault().getCurrentFile(); }
public static void addPropertyChangeListener(PropertyChangeListener l) { //getContext ().addPropertyChangeListener (l); EditorContextDispatcher.getDefault().addPropertyChangeListener("text/x-groovy", l); // NOI18N }
public static void removePropertyChangeListener(PropertyChangeListener l) { //getContext ().removePropertyChangeListener (l); EditorContextDispatcher.getDefault().removePropertyChangeListener(l); }
/** * Returns number of line currently selected in editor or <code>-1</code>. * * @return number of line currently selected in editor or <code>-1</code> */ @Override public int getCurrentLineNumber() { return contextDispatcher.getCurrentLineNumber(); }
/** * Returns URL of source currently selected in editor or empty string. * * @return URL of source currently selected in editor or empty string */ @Override public String getCurrentURL () { return contextDispatcher.getCurrentURLAsString(); }
mSwitcher.setFactory(new ViewFactory() {
/** * Returns number of line currently selected in editor or <code>-1</code>. * * @return number of line currently selected in editor or <code>-1</code> */ @Override public int getCurrentLineNumber () { return contextDispatcher.getCurrentLineNumber(); }
/** * Returns URL of source currently selected in editor or empty string. * * @return URL of source currently selected in editor or empty string */ @Override public String getCurrentURL () { return contextDispatcher.getCurrentURLAsString(); }