Package org.netbeans.api.scala.platform

Examples of org.netbeans.api.scala.platform.ScalaPlatform


            /**@TODO
             * hacking for get scala platform's classpath and source path,
             * should get them from project's classpath or properties.
             */
            ScalaPlatform scalaPlatform = bootClassPathImpl.findActiveScalaPlatform();
            if (scalaPlatform != null) {
                /**
                 * we are not sure the initial order of gsf classpath and java classpath,
                 * we here just call scalaPlatform.getStandardLibraries() to initial SCALAC_CLASS_PATH
                 */
                ClassPath scalaStdCp = scalaPlatform.getStandardLibraries();
                for (Entry entry : scalaStdCp.entries()) {
                    resources.add(ClassPathSupport.createResource(entry.getURL()));
                }
            }

View Full Code Here


    private synchronized ClassPath getRunTimeClasspath(final int type) {
        ClassPath cp = cache[4 + type];
        if (cp == null) {
            List<PathResourceImplementation> resources = new ArrayList<PathResourceImplementation>();

            ScalaPlatform scalaPlatform = bootClassPathImpl.findActiveScalaPlatform();
            if (scalaPlatform != null) {
                /**
                 * we are not sure the initial order of gsf classpath and java classpath,
                 * we here just call scalaPlatform.getStandardLibraries() to initial SCALAC_CLASS_PATH
                 */
                ClassPath scalaStdLibsCp = scalaPlatform.getStandardLibraries();
                for (ClassPath.Entry entry : scalaStdLibsCp.entries()) {
                    resources.add(ClassPathSupport.createResource(entry.getURL()));
                }
            }

View Full Code Here

        if (pNode == null) {
            ((CardLayout)cards.getLayout()).last(cards);
            return;
        }
        JComponent target = messageArea;
        ScalaPlatform platform = pNode.getLookup().lookup(ScalaPlatform.class);
        if (platform != null) {
            this.removeButton.setEnabled (isDefaultPLatform(platform));           
            if (platform.getInstallFolders().size() != 0) {
                this.platformName.setText(pNode.getDisplayName());
                for (FileObject installFolder : platform.getInstallFolders()) {
                    File file = FileUtil.toFile(installFolder);
                    if (file != null) {
                        this.platformHome.setText (file.getAbsolutePath());
                    }
                }
View Full Code Here

        ((GridBagLayout)container.getLayout()).setConstraints (component,c);
        container.add (component);
    }

    private static boolean isDefaultPLatform (ScalaPlatform platform) {
        ScalaPlatform defaultPlatform = ScalaPlatformManager.getDefault().getDefaultPlatform();
        return defaultPlatform!=null && !defaultPlatform.equals(platform);
    }
View Full Code Here

                java.util.Map<String,PlatformCategoriesDescriptor> categories = new HashMap<String,PlatformCategoriesDescriptor>();
                for (FileObject child : storage.getChildren()) {
                    try {
                        DataObject dobj = DataObject.find(child);
                        Node node = dobj.getNodeDelegate();
                        ScalaPlatform platform = node.getLookup().lookup(ScalaPlatform.class);
                        if (platform != null) {
                            String platformType = platform.getSpecification().getName();
                            if (platformType != null) {
                                platformType = platformType.toUpperCase(Locale.ENGLISH);
                                PlatformCategoriesDescriptor platforms = categories.get(platformType);
                                if (platforms == null ) {
                                    platforms = new PlatformCategoriesDescriptor (platformType);
                                    categories.put (platformType, platforms);
                                }
                                platforms.add (node);
                            }
                            else {
                                ErrorManager.getDefault().log ("Platform: "+ platform.getDisplayName() +" has invalid specification.")//NOI18N
                            }
                        }
                        else {                       
                            ErrorManager.getDefault().log ("Platform node for : "+node.getDisplayName()+" has no platform in its lookup.");   //NOI18N
                        }                   
View Full Code Here

            for (ClassPath.Entry entry : cp.entries()) {
                result.add(ClassPathSupport.createResource(entry.getURL()));
            }
        }
       
        ScalaPlatform sp = findActiveScalaPlatform();
        if (sp != null) {
            final ClassPath cp = sp.getBootstrapLibraries();
            assert cp != null : cp;
            for (ClassPath.Entry entry : cp.entries()) {
                result.add(ClassPathSupport.createResource(entry.getURL()));
            }
        }
View Full Code Here

        if (this.scalaPlatformManager == null) {
            this.scalaPlatformManager = ScalaPlatformManager.getDefault();
            this.scalaPlatformManager.addPropertyChangeListener(WeakListeners.propertyChange(this, this.platformManager));
        }               
        this.activeScalaPlatformName = evaluator.getProperty(SCALA_PLATFORM_ACTIVE);
        final ScalaPlatform activePlatform = scalaPlatformManager.getDefaultPlatform();
        //final JavaPlatform activePlatform = J2SEProjectUtil.getActivePlatform (this.activePlatformName);
        this.isActiveScalaPlatformValid = activePlatform != null;
        return activePlatform;
    }
View Full Code Here

                    throw (IOException)x;
                else
                    throw new java.io.IOException(ex.getMessage());
            }

            ScalaPlatform inst = createPlatform(handler);
            refPlatform = new WeakReference<ScalaPlatform>(inst);
            return inst;
        }
    }
View Full Code Here

            return inst;
        }
    }
   
    ScalaPlatform createPlatform(H handler) {
        ScalaPlatform p;
       
        if (handler.isDefault) {
            p = DefaultPlatformImpl.create (handler.properties, handler.sources, handler.javadoc);
            defaultPlatform = true;
        } else {
            p = new J2SEPlatformImpl(handler.name,handler.installFolders, handler.properties, handler.sysProperties,handler.sources, handler.javadoc);
            defaultPlatform = false;
        }
        p.addPropertyChangeListener(this);
        return p;
    }
View Full Code Here

        PropertyChangeEvent e;
       
        synchronized (this) {
            e = keepAlive.removeFirst();
        }
        ScalaPlatform plat = (ScalaPlatform)e.getSource();
        try {
            holder.getPrimaryFile().getFileSystem().runAtomicAction(
                new W(plat, holder, defaultPlatform));
        } catch (java.io.IOException ex) {
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
View Full Code Here

TOP

Related Classes of org.netbeans.api.scala.platform.ScalaPlatform

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.