01: /*
02: * Sun Public License Notice
03: *
04: * The contents of this file are subject to the Sun Public License
05: * Version 1.0 (the "License"). You may not use this file except in
06: * compliance with the License. A copy of the License is available at
07: * http://www.sun.com/
08: *
09: * The Original Code is NetBeans. The Initial Developer of the Original
10: * Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
11: * Microsystems, Inc. All Rights Reserved.
12: */
13:
14: package org.netbeans.editor;
15:
16: import java.util.ResourceBundle;
17:
18: import javax.swing.Action;
19:
20: /**
21: * This is provider of implementation. This package (org.netbeans.editor)
22: * represent editor core which can be used independently on the rest of
23: * NetBeans. However this core needs access to higher level functionality like
24: * access to localized bundles, access to settings storage, etc. which can be
25: * implemented differently by the applications which uses this editor core. For
26: * this purpose was created this abstract class and it can be extended with any
27: * other methods which are more and more often required by core editor. Example
28: * implementation of this provider can be found in org.netbeans.modules.editor
29: * package
30: *
31: * @author David Konecny
32: * @since 10/2001
33: */
34:
35: abstract public class ImplementationProvider {
36:
37: private static ImplementationProvider provider = null;
38:
39: /** Returns currently registered provider */
40: public static ImplementationProvider getDefault() {
41: return provider;
42: }
43:
44: /** Register your own provider through this method */
45: public static void registerDefault(ImplementationProvider prov) {
46: provider = prov;
47: }
48:
49: /** Return ResourceBundle for the given class. */
50: abstract public ResourceBundle getResourceBundle(String localizer);
51:
52: /**
53: * This is temporary method which allows core editor to access toggle
54: * breakpoint action. This action is then used when user clicks on glyph
55: * gutter. In next version this should be removed and redesigned as
56: * suggested in issue #16762
57: */
58: abstract public Action getToggleBreakpointAction();
59:
60: }
|