Package org.openide.util.lookup

Examples of org.openide.util.lookup.ProxyLookup


        init(img);
    }

    private void init(BufferedImage img) {
        saveLookup = new InstanceContent();
        associateLookup(new ProxyLookup(new AbstractLookup(content),
                new AbstractLookup(saveLookup), Lookups.singleton(this)));
        content.add(dataInfo);
        final Parameters params = new Parameters(dataInfo, this);
        content.add(params);
        final ColorMapper cm = new ColorMapper(params, this);
View Full Code Here


        private final CoffeeScriptProject project;

        public TextNode(Node node, CoffeeScriptProject project) throws DataObjectNotFoundException {
            super(node, new FilterNode.Children(node),
                    new ProxyLookup(new Lookup[]{
                        Lookups.singleton(project),
                        node.getLookup()
                    }));
            this.project = project;
        }
View Full Code Here

        return new DataNode(this, Children.LEAF, getLookup());
    }

    @Override
    public Lookup getLookup() {
        return new ProxyLookup(new Lookup[] {
            getCookieSet().getLookup(),
            Lookups.fixed(new CoffeeScriptSourceEncodingQuery())
        });
    }
View Full Code Here

        setChildren( createProjectChildren( getLookup().lookup( NodeJSProject.class ) ) );
    }

    @SuppressWarnings ("LeakingThisInConstructor") //NOI18N
    public RootNode ( NodeJSProject project, InstanceContent content ) {
        super( createProjectChildren( project ), new ProxyLookup( project.getLookup(), new AbstractLookup( content ) ) );
        content.add( this );
        final ProjectInformation info = getLookup().lookup( ProjectInformation.class );
        setDisplayName( info.getDisplayName() );
        info.addPropertyChangeListener( new PropertyChangeListener() {
            @Override
View Full Code Here

    MVCNode(DataFolder folder, DataFilter filter, String name) {
        this(folder, new FilterNode(folder.getNodeDelegate(), folder.createNodeChildren(filter)), name);
    }

    private MVCNode(DataFolder folder, FilterNode node, String name) {
        super(node, new MVCNode.FolderChildren(node, false), new ProxyLookup(folder.getNodeDelegate().getLookup()));

        disableDelegation(DELEGATE_GET_DISPLAY_NAME | DELEGATE_SET_DISPLAY_NAME | DELEGATE_GET_SHORT_DESCRIPTION | DELEGATE_GET_ACTIONS);
        setDisplayName(name);
    }
View Full Code Here

    private static final class PackageNode extends FilterNode {

        public PackageNode(final Node originalNode, boolean isTest) {
            super(originalNode, new MVCNode.FolderChildren(originalNode, isTest),
                    new ProxyLookup(originalNode.getLookup()));
        }
View Full Code Here

    private Children createChildren() {
        return Children.create(new GradleProjectChildFactory(project, this), false);
    }

    private Lookup createLookup(Node rootNode) {
        return new ProxyLookup(
                project.getLookup(),
                rootNode.getLookup());
    }
View Full Code Here

    }

    private Lookup getCombinedLookup() {
        Lookup lookup = combinedLookupRef.get();
        if (lookup == null) {
            lookup = new ProxyLookup(
                    getPermanentProjectLookup(),
                    getProjectLookup(),
                    getExtensionLookup());
            combinedLookupRef.compareAndSet(null, lookup);
            lookup = combinedLookupRef.get();
View Full Code Here

        this.extensionNames = Collections.unmodifiableSet(newExtensionNames);
        this.extensionRefs = Collections.unmodifiableList(new ArrayList<>(extensions));

        Lookup combinedLookupProviders = LookupProviderSupport.createCompositeLookup(Lookup.EMPTY, Lookups.fixed(allLookupProviders.toArray()));
        final Lookup combinedAllLookups = new ProxyLookup(combinedLookupProviders);
        getMainLookup().replaceLookups(new ProjectLookupHack(new ProjectLookupHack.LookupContainer() {
            @Override
            public NbGradleProject getProject() {
                return NbGradleProject.this;
            }
View Full Code Here

            return commandStringLookup(command);
        }

        NbCommandString currentNbCommandStr = context.lookup(NbCommandString.class);
        if (currentNbCommandStr == null) {
            return new ProxyLookup(commandStringLookup(command), context);
        }

        NbCommandString nbCommandString = new NbCommandString(command);
        if (nbCommandString.equals(currentNbCommandStr)) {
            return context;
        }
        return new ProxyLookup(Lookups.singleton(nbCommandString), context);
    }
View Full Code Here

TOP

Related Classes of org.openide.util.lookup.ProxyLookup

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.