Package org.netbeans.api.project

Examples of org.netbeans.api.project.ProjectInformation


                File f = (File) value;
                String message = f.getAbsolutePath();
                if (projectConflict) {
                    Project p = FileOwnerQuery.getOwner(f.toURI());
                    if (p!=null) {
                        ProjectInformation pi = ProjectUtils.getInformation(p);
                        String projectName = pi.getDisplayName();
                        message = MessageFormat.format (NbBundle.getMessage(J2SESourceRootsUi.class,"TXT_RootOwnedByProject"), new Object[] {
                            message,
                            projectName});
                    }
                }
View Full Code Here


            @Override
            public void run() {
                IOTabIvyLogger logger = null;
                try {
                    ProjectInformation projectInformation = ProjectUtils.getInformation(project);
                    ProjectPreferences projectPreferences = project.getLookup().lookup(ProjectPreferences.class);
                    ArtifactUpdater updater = project.getLookup().lookup(ArtifactUpdater.class);
                    Ivy ivy = getIvy(projectPreferences.getIvySettingsFile(), projectPreferences.getIvyPropertiesFiles());
                    logger = new IOTabIvyLogger(projectInformation.getDisplayName(), IOTabIvyLogger.TAB_SUFFIX);

                    logger.log(NbBundle.getMessage(IvyFacade.class, "StartResolve"), Message.MSG_INFO);

                    IvyProgressHandleListener transferListener = new IvyProgressHandleListener(projectInformation.getDisplayName() + " " + NbBundle.getMessage(IvyProgressHandleListener.class, "Resolving"));
                    IvyProgressHandleTransferListener ivyProgressHandleTransferListener = new IvyProgressHandleTransferListener(projectInformation.getDisplayName());
                    ivy.getLoggerEngine().setDefaultLogger(logger);
                    ivy.getEventManager().addIvyListener(transferListener);
                    ivy.getEventManager().addTransferListener(ivyProgressHandleTransferListener);
                    URL ivyFileLocation = projectPreferences.getIvyFile().getURL();
                    String[] confs;
View Full Code Here

            File f = new File ((String) o);
            if (f.exists ()) {
                FileObject fo = FileUtil.toFileObject (f);
                Project p = FileOwnerQuery.getOwner (fo);
                if (p != null) {
                    ProjectInformation pi = (ProjectInformation) p.getLookup ().
                        lookup (ProjectInformation.class);
                    return java.text.MessageFormat.format(NbBundle.getBundle(SourcesNodeModel.class).getString(
                            "CTL_SourcesModel_Column_Name_ProjectSources"), new Object [] { f.getPath(), pi.getDisplayName() });
                }
                return java.text.MessageFormat.format(NbBundle.getBundle(SourcesNodeModel.class).getString(
                        "CTL_SourcesModel_Column_Name_LibrarySources"), new Object [] { f.getPath() });
            } else
            return (String) o;
View Full Code Here

    }

    private void showPlatformWarning() {
        final JButton closeOption = new JButton(NbBundle.getMessage(J2SEActionProvider.class, "CTL_BrokenPlatform_Close"));
        closeOption.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(J2SEActionProvider.class, "AD_BrokenPlatform_Close"));
        final ProjectInformation pi = project.getLookup().lookup(ProjectInformation.class);
        final String projectDisplayName = pi == null
                ? NbBundle.getMessage(J2SEActionProvider.class, "TEXT_BrokenPlatform_UnknownProjectName")
                : pi.getDisplayName();
        final DialogDescriptor dd = new DialogDescriptor(
                NbBundle.getMessage(J2SEActionProvider.class, "TEXT_BrokenPlatform", projectDisplayName),
                NbBundle.getMessage(J2SEActionProvider.class, "MSG_BrokenPlatform_Title"),
                true,
                new Object[]{closeOption},
View Full Code Here

    }
   
    private void fixDistJarProperty (final String newName) {
        ProjectManager.mutex().writeAccess(new Runnable () {
            public void run () {
                ProjectInformation pi = project.getLookup().lookup(ProjectInformation.class);
                String oldDistJar = pi == null ? null : "${dist.dir}/"+PropertyUtils.getUsablePropertyName(pi.getDisplayName())+".jar"; //NOI18N
                EditableProperties ep = project.getUpdateHelper().getProperties (AntProjectHelper.PROJECT_PROPERTIES_PATH);
                String propValue = ep.getProperty("dist.jar")//NOI18N
                if (oldDistJar != null && oldDistJar.equals (propValue)) {
                    ep.put ("dist.jar","${dist.dir}/"+PropertyUtils.getUsablePropertyName(newName)+".jar"); //NOI18N
                    project.getUpdateHelper().putProperties (AntProjectHelper.PROJECT_PROPERTIES_PATH,ep);
View Full Code Here

    public static String GetProjectName(Project p)
    {

        if(p != null)
        {
            ProjectInformation info = p.getLookup().lookup(ProjectInformation.class);
            return info.getDisplayName();
        }
        return null;

    }
View Full Code Here

            }
        }
        Project p = FileOwnerQuery.getOwner( file );
        String displayName = file.getName();
        if (p != null && p.getLookup().lookup( NodeJSProject.class ) != null) {
            ProjectInformation pi = p.getLookup().lookup( ProjectInformation.class );
            displayName = pi == null ? p.getProjectDirectory().getName() : pi.getDisplayName();
            MainFileProvider prov = p.getLookup().lookup( MainFileProvider.class );
            if (prov != null && !file.equals( prov.getMainFile() )) {
                displayName += "-" + file.getName(); //NOI18N
            }
        }
View Full Code Here

    @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
            public void propertyChange ( PropertyChangeEvent evt ) {
                setDisplayName( info.getDisplayName() );
            }
        } );
        setIconBaseWithExtension( LOGO_ICON );
    }
View Full Code Here

        File testResultsDir = getAndCreateTestResultsDir(project);
        ZipUtils.unzipResource(getResourcePath(testResultsZip), testResultsDir);
    }

    private static String getExpectedSessionName(Project project) {
        ProjectInformation projectInfo = ProjectUtils.getInformation(project);
        return projectInfo.getDisplayName();
    }
View Full Code Here

        this.javaExt = JavaExtension.getJavaExtensionOfProject(project);
        this.testManager = testManager;
    }

    private String getProjectName() {
        ProjectInformation projectInfo = ProjectUtils.getInformation(project);
        return projectInfo.getDisplayName();
    }
View Full Code Here

TOP

Related Classes of org.netbeans.api.project.ProjectInformation

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.