From: <de...@us...> - 2011-11-11 09:46:00
|
Revision: 6663 http://fudaa.svn.sourceforge.net/fudaa/?rev=6663&view=rev Author: deniger Date: 2011-11-11 09:45:50 +0000 (Fri, 11 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/soft/fudaa-crue/pom.xml trunk/soft/fudaa-crue/ui-application/pom.xml trunk/soft/fudaa-crue/ui-branding/pom.xml trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/ActivePerspectiveAbstract.java trunk/soft/fudaa-crue/ui-branding/src/main/nbm/module.xml trunk/soft/fudaa-crue/ui-branding/src/main/resources/org/fudaa/fudaa/crue/branding/layer.xml trunk/soft/fudaa-crue/ui-modelling/pom.xml trunk/soft/fudaa-crue/ui-otfa/pom.xml trunk/soft/fudaa-crue/ui-post/pom.xml trunk/soft/fudaa-crue/ui-study/pom.xml Added Paths: ----------- trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/services/ trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/services/SelectedPerspectiveService.java trunk/soft/fudaa-crue/ui-wrapper/ trunk/soft/fudaa-crue/ui-wrapper/pom.xml trunk/soft/fudaa-crue/ui-wrapper/src/ trunk/soft/fudaa-crue/ui-wrapper/src/main/ trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/ trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/manifest.mf trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/module.xml Removed Paths: ------------- trunk/soft/fudaa-crue/ui-branding/src/main/resources/my.properties Modified: trunk/soft/fudaa-crue/pom.xml =================================================================== --- trunk/soft/fudaa-crue/pom.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/pom.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -34,6 +34,7 @@ <modules> <module>crue-server</module> <!-- <module>crue-ui</module>--> + <module>ui-wrapper</module> <module>ui-branding</module> <module>ui-study</module> <module>ui-modelling</module> @@ -67,6 +68,12 @@ </dependency> <dependency> <groupId>org.fudaa.soft.fudaa-crue</groupId> + <artifactId>ui-wrapper</artifactId> + <version>${project.version}</version> + <type>nbm</type> + </dependency> + <dependency> + <groupId>org.fudaa.soft.fudaa-crue</groupId> <artifactId>ui-branding</artifactId> <version>${project.version}</version> <type>nbm</type> Modified: trunk/soft/fudaa-crue/ui-application/pom.xml =================================================================== --- trunk/soft/fudaa-crue/ui-application/pom.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-application/pom.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -28,6 +28,11 @@ </dependency> <dependency> <groupId>${project.groupId}</groupId> + <artifactId>ui-wrapper</artifactId> + <type>nbm</type> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> <artifactId>ui-branding</artifactId> <type>nbm</type> </dependency> @@ -51,7 +56,7 @@ <artifactId>ui-otfa</artifactId> <type>nbm</type> </dependency> - + </dependencies> <build> Modified: trunk/soft/fudaa-crue/ui-branding/pom.xml =================================================================== --- trunk/soft/fudaa-crue/ui-branding/pom.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-branding/pom.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -18,10 +18,6 @@ <dependencies> <dependency> - <groupId>org.fudaa.soft.fudaa-crue</groupId> - <artifactId>crue-server</artifactId> - </dependency> - <dependency> <groupId>org.netbeans.api</groupId> <artifactId>org-netbeans-api-annotations-common</artifactId> <version>${netbeans.version}</version> @@ -64,11 +60,6 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>nbm-maven-plugin</artifactId> - <configuration> - <publicPackages> - <publicPackage>org.*</publicPackage> - </publicPackages> - </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> Modified: trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/ActivePerspectiveAbstract.java =================================================================== --- trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/ActivePerspectiveAbstract.java 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/ActivePerspectiveAbstract.java 2011-11-11 09:45:50 UTC (rev 6663) @@ -7,17 +7,14 @@ import java.awt.event.ActionEvent; import java.util.Collection; -import java.util.Collections; import java.util.Set; +import org.fudaa.fudaa.crue.branding.services.SelectedPerspectiveService; import org.openide.util.HelpCtx; import org.openide.util.Lookup; import org.openide.util.LookupEvent; import org.openide.util.LookupListener; import org.openide.util.NbBundle; -import org.openide.util.Utilities; import org.openide.util.actions.BooleanStateAction; -import org.openide.util.lookup.AbstractLookup; -import org.openide.util.lookup.InstanceContent; import org.openide.util.lookup.Lookups; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; @@ -26,6 +23,7 @@ private final Collection<String> topComponents; private Lookup.Result result = null; + SelectedPerspectiveService service = Lookup.getDefault().lookup(SelectedPerspectiveService.class); public ActivePerspectiveAbstract(String textCode, Collection<String> topComponent) { putValue(NAME, NbBundle.getMessage(getClass(), textCode)); @@ -37,11 +35,8 @@ @Override public void resultChanged(LookupEvent lookupEvent) { - Lookup.Result r = (Lookup.Result) lookupEvent.getSource(); - Collection c = r.allInstances(); - for (Object object : c) { - System.err.println(object); - } + setEnabled(true); + actionPerformed(null); } @Override @@ -56,11 +51,13 @@ @Override public void actionPerformed(ActionEvent ev) { + super.actionPerformed(ev); if (getBooleanState()) { + setEnabled(false); Lookups.singleton(new Perspective(getName())); - - result = Lookup.getDefault().lookupResult(Perspective.class); + service.activePerspective(getName()); + result = service.getLookup().lookupResult(String.class); result.allItems(); result.addLookupListener(this); Set<TopComponent> opened = WindowManager.getDefault().getRegistry().getOpened(); @@ -73,10 +70,9 @@ findTopComponent.open(); } } - } - else{ + } else { result.removeLookupListener(this); - result=null; + result = null; } } } Added: trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/services/SelectedPerspectiveService.java =================================================================== --- trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/services/SelectedPerspectiveService.java (rev 0) +++ trunk/soft/fudaa-crue/ui-branding/src/main/java/org/fudaa/fudaa/crue/branding/services/SelectedPerspectiveService.java 2011-11-11 09:45:50 UTC (rev 6663) @@ -0,0 +1,34 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.fudaa.fudaa.crue.branding.services; + +import org.openide.util.Lookup; +import org.openide.util.lookup.AbstractLookup; +import org.openide.util.lookup.InstanceContent; +import org.openide.util.lookup.ServiceProvider; + +/** + * + * @author genesis + */ +@ServiceProvider(service = SelectedPerspectiveService.class) +public class SelectedPerspectiveService implements Lookup.Provider { + + InstanceContent content = new InstanceContent(); + Lookup dynamicLookup = new AbstractLookup(content); + + @Override + public Lookup getLookup() { + return dynamicLookup; + } + + public void activePerspective(String persective) { + final String selectedPersective = dynamicLookup.lookup(String.class); + if (selectedPersective != null) { + content.remove(selectedPersective); + } + content.add(persective); + } +} Modified: trunk/soft/fudaa-crue/ui-branding/src/main/nbm/module.xml =================================================================== --- trunk/soft/fudaa-crue/ui-branding/src/main/nbm/module.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-branding/src/main/nbm/module.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -5,6 +5,5 @@ <codeNameBase>org.fudaa.fudaa.test.testui/1</codeNameBase> --> <licenseName>GPL 2</licenseName> - <licenseFile>license.txt</licenseFile> </nbm> Deleted: trunk/soft/fudaa-crue/ui-branding/src/main/resources/my.properties =================================================================== --- trunk/soft/fudaa-crue/ui-branding/src/main/resources/my.properties 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-branding/src/main/resources/my.properties 2011-11-11 09:45:50 UTC (rev 6663) @@ -1,45 +0,0 @@ -############################################################ -# Default Logging Configuration File -# -# You can use a different file by specifying a filename -# with the java.util.logging.config.file system property. -# For example java -Djava.util.logging.config.file=myfile -############################################################ - -############################################################ -# Global properties -############################################################ - -# "handlers" specifies a comma separated list of log Handler -# classes. These handlers will be installed during VM startup. -# Note that these classes must be on the system classpath. -# By default we only configure a ConsoleHandler, which will only -# show messages at the INFO and above levels. -handlers= java.util.logging.ConsoleHandler - -# To also add the FileHandler, use the following line instead. -#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler - -# Default global logging level. -# This specifies which kinds of events are logged across -# all loggers. For any given facility this global level -# can be overriden by a facility specific level -# Note that the ConsoleHandler also has a separate level -# setting to limit messages printed to the console. -.level= INFO - -############################################################ -# Handler specific properties. -# Describes specific configuration info for Handlers. -############################################################ - -# default file output is in user's home directory. -java.util.logging.FileHandler.pattern = %h/java%u.log -java.util.logging.FileHandler.limit = 50000 -java.util.logging.FileHandler.count = 1 -java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter - -# Limit the message that are printed on the console to INFO and above. -java.util.logging.ConsoleHandler.level = WARN -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter - Modified: trunk/soft/fudaa-crue/ui-branding/src/main/resources/org/fudaa/fudaa/crue/branding/layer.xml =================================================================== --- trunk/soft/fudaa-crue/ui-branding/src/main/resources/org/fudaa/fudaa/crue/branding/layer.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-branding/src/main/resources/org/fudaa/fudaa/crue/branding/layer.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -1,6 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd"> <filesystem> + <folder name="Browsers"> + <attr name="helpID" stringvalue="org.netbeans.core.services.Browsers"/> + <file name="SwingBrowser.settings" url="SwingBrowserSettings_1.xml"> + <attr name="hidden" boolvalue="true"/> + <attr name="internal" boolvalue="true"/> + </file> + </folder> <folder name="Menu"> <file name="BuildProject_hidden"/> <folder name="File_hidden"/> Modified: trunk/soft/fudaa-crue/ui-modelling/pom.xml =================================================================== --- trunk/soft/fudaa-crue/ui-modelling/pom.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-modelling/pom.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -23,7 +23,7 @@ </dependency> <dependency> <groupId>org.fudaa.soft.fudaa-crue</groupId> - <artifactId>ui-branding</artifactId> + <artifactId>ui-wrapper</artifactId> <type>nbm</type> </dependency> <dependency> Modified: trunk/soft/fudaa-crue/ui-otfa/pom.xml =================================================================== --- trunk/soft/fudaa-crue/ui-otfa/pom.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-otfa/pom.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -25,7 +25,7 @@ </dependency> <dependency> <groupId>org.fudaa.soft.fudaa-crue</groupId> - <artifactId>ui-branding</artifactId> + <artifactId>ui-wrapper</artifactId> <type>nbm</type> </dependency> <dependency> Modified: trunk/soft/fudaa-crue/ui-post/pom.xml =================================================================== --- trunk/soft/fudaa-crue/ui-post/pom.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-post/pom.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -23,7 +23,7 @@ </dependency> <dependency> <groupId>org.fudaa.soft.fudaa-crue</groupId> - <artifactId>ui-branding</artifactId> + <artifactId>ui-wrapper</artifactId> <type>nbm</type> </dependency> <dependency> Modified: trunk/soft/fudaa-crue/ui-study/pom.xml =================================================================== --- trunk/soft/fudaa-crue/ui-study/pom.xml 2011-11-11 08:10:48 UTC (rev 6662) +++ trunk/soft/fudaa-crue/ui-study/pom.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -15,7 +15,6 @@ </properties> <dependencies> - <!--ui-branding est egalement utilise comme "librairy wrapper"--> <dependency> <groupId>org.fudaa.soft.fudaa-crue</groupId> <artifactId>crue-server</artifactId> @@ -23,7 +22,7 @@ </dependency> <dependency> <groupId>org.fudaa.soft.fudaa-crue</groupId> - <artifactId>ui-branding</artifactId> + <artifactId>ui-wrapper</artifactId> <type>nbm</type> </dependency> Property changes on: trunk/soft/fudaa-crue/ui-wrapper ___________________________________________________________________ Added: svn:ignore + target Added: trunk/soft/fudaa-crue/ui-wrapper/pom.xml =================================================================== --- trunk/soft/fudaa-crue/ui-wrapper/pom.xml (rev 0) +++ trunk/soft/fudaa-crue/ui-wrapper/pom.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>fudaa-crue</artifactId> + <groupId>org.fudaa.soft.fudaa-crue</groupId> + <version>0.38-SNAPSHOT</version> + </parent> + + <artifactId>ui-wrapper</artifactId> + <packaging>nbm</packaging> + + <name>Crue UI Lib Wrapper</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.fudaa.soft.fudaa-crue</groupId> + <artifactId>crue-server</artifactId> + </dependency> + </dependencies> + + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>nbm-maven-plugin</artifactId> + <configuration> + <publicPackages> + <publicPackage>org.*</publicPackage> + </publicPackages> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <!-- to have the jar plugin pickup the nbm generated manifest --> + <useDefaultManifestFile>true</useDefaultManifestFile> + </configuration> + </plugin> + </plugins> + </build> +</project> Added: trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/manifest.mf =================================================================== --- trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/manifest.mf (rev 0) +++ trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/manifest.mf 2011-11-11 09:45:50 UTC (rev 6663) @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + Added: trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/module.xml =================================================================== --- trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/module.xml (rev 0) +++ trunk/soft/fudaa-crue/ui-wrapper/src/main/nbm/module.xml 2011-11-11 09:45:50 UTC (rev 6663) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<nbm> + <!-- + <moduleType>autoload</moduleType> + <codeNameBase>com.mycompany/1</codeNameBase> + <licenseName>Apache License, Version 2.0</licenseName> + <licenseFile>license.txt</licenseFile> + --> +</nbm> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |