Package org.locationtech.udig.core.internal

Examples of org.locationtech.udig.core.internal.ExtensionPointProcessor


     *
     * @return A set of id's.
     */
    public static Set<String> getStyleIDs(final Layer layer) {
        final Set<String> ids = new HashSet<String>();
        ExtensionPointProcessor p = new ExtensionPointProcessor() {
            public void process( IExtension extension, IConfigurationElement element ) throws Exception {
                IStyleConfigurator sce = (IStyleConfigurator)element.createExecutableExtension("class"); //$NON-NLS-1$
                if (sce.canStyle(layer)) {
                    ids.add(sce.getStyleId());
                }
View Full Code Here


        if (sites != null) { // horrible must be a mistake
            throw new IllegalStateException("StyleView init called twice!"); //$NON-NLS-1$
        }
        sites = new ArrayList<StyleViewSite>();

        ExtensionPointUtil.process(StylePlugin.getDefault(), IStyleConfigurator.XPID, new ExtensionPointProcessor(){
            public void process( IExtension extension, IConfigurationElement element )
                    throws Exception {
                IStyleConfigurator config = (IStyleConfigurator) element
                        .createExecutableExtension("class"); //$NON-NLS-1$
View Full Code Here

     * populate getCatalogs() and the result is cached.
     */
    private List<ISearch> loadCatalogs() {
        final List<ISearch> availableCatalogs = new LinkedList<ISearch>();
        ExtensionPointUtil.process(getDefault(),
            EXTENSION_POINT_ICATALOG, new ExtensionPointProcessor(){
                public void process( IExtension extension, IConfigurationElement element )
                        throws Exception {
                    ISearch externalCatalog = (ISearch) element.createExecutableExtension("class");
                    availableCatalogs.add(externalCatalog); //$NON-NLS-1$                
                }
View Full Code Here

            if (registered == null) { // load available
                // we are going to sort the map so that "generic" fallback datastores are selected last
                //
                registered = new HashMap<String, ServiceExtension>();
                ExtensionPointUtil.process(CatalogPlugin.getDefault(),
                        ServiceExtension.EXTENSION_ID, new ExtensionPointProcessor() { //$NON-NLS-1$
                            public void process(IExtension extension, IConfigurationElement element) throws Exception {
                                // extentionIdentifier used to report any problems;
                                // in the event of failure we want to be able to report
                                // who had the problem
                                // String extensionId = extension.getUniqueIdentifier();
View Full Code Here

                return a.getSimpleName().compareTo( b.getSimpleName() );
            }               
        };
        classToEditors = new TreeMap<Class, List<SLDEditorPart>>( compare );

        ExtensionPointProcessor p = new ExtensionPointProcessor(){
            public void process( IExtension ext, IConfigurationElement element ) throws Exception {
                try {
                    SLDEditorPart editor = (SLDEditorPart) element
                            .createExecutableExtension("class"); //$NON-NLS-1$
View Full Code Here

     */
    synchronized List<FileType> getTypeList() {
        if (typeList == null) {
            final Set<FileType> extensionSet = new TreeSet<FileType>();
            ExtensionPointUtil.process(CatalogUIPlugin.getDefault(),
                    FILE_FORMAT_EXTENSION, new ExtensionPointProcessor(){
                        public void process( IExtension extension, IConfigurationElement element )
                                throws Exception {
                            if ("fileService".equals(element.getName())) { //$NON-NLS-1$
                                String name = element.getAttribute("name"); //$NON-NLS-1$
                                String ext = element.getAttribute("fileExtension"); //$NON-NLS-1$
View Full Code Here

    private static List<FeaturePanelEntry> featurePanelList;

    public FeaturePanelProcessor() {
        featurePanelList = new ArrayList<FeaturePanelEntry>();
        ExtensionPointUtil.process(ProjectPlugin.getPlugin(), FEATURE_PANEL_ID,
                new ExtensionPointProcessor(){
                    public void process( IExtension extension, IConfigurationElement element )
                            throws Exception {
                        FeaturePanelEntry entry = new FeaturePanelEntry(extension, element);
                        featurePanelList.add(entry);
                    }
View Full Code Here

    /**
     * @generated NOT
     */
    private void loadStyleContent(final String styleId) {
        id2content.put(styleId, StyleContent.DEFAULT); // default to use of we cannot find a specific one
        ExtensionPointProcessor p = new ExtensionPointProcessor() {
            boolean found = false;

            public void process(IExtension extension, IConfigurationElement element)
                    throws Exception {
                if (!found && element.getAttribute("id").equals(styleId)) { //$NON-NLS-1$
View Full Code Here

        }
    }
    @SuppressWarnings("deprecation")
    void processingExtensionPointUsingUtilityClassOld() {
        String xpid = "org.locationtech.udig.project.ui.tool";
        ExtensionPointUtil.process(xpid, new ExtensionPointProcessor(){
            public void process( IExtension extension, IConfigurationElement element )
                    throws Exception {
                String name = element.getName();
                System.out.println(name);
                if ("modalTool".equals(name)) {
View Full Code Here

            }
        });
    }
    void processingExtensionPointUsingUtilityClass() {
        String xpid = "org.locationtech.udig.project.ui.tool";
        ExtensionPointUtil.process(Activator.getDefault(), xpid, new ExtensionPointProcessor(){
            public void process( IExtension extension, IConfigurationElement element )
                    throws Exception {
                String name = element.getName();
                System.out.println(name);
                if ("modalTool".equals(name)) {
View Full Code Here

TOP

Related Classes of org.locationtech.udig.core.internal.ExtensionPointProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.