This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 193724
Collapse All | Expand All

(-)a/apisupport.feedreader/feedreader-suite/FeedReader/nbproject/project.xml (+9 lines)
Lines 23-28 Link Here
23
                    </run-dependency>
23
                    </run-dependency>
24
                </dependency>
24
                </dependency>
25
                <dependency>
25
                <dependency>
26
                    <code-name-base>org.netbeans.modules.settings</code-name-base>
27
                    <build-prerequisite/>
28
                    <compile-dependency/>
29
                    <run-dependency>
30
                        <release-version>1</release-version>
31
                        <specification-version>1.29</specification-version>
32
                    </run-dependency>
33
                </dependency>
34
                <dependency>
26
                    <code-name-base>org.openide.actions</code-name-base>
35
                    <code-name-base>org.openide.actions</code-name-base>
27
                    <build-prerequisite/>
36
                    <build-prerequisite/>
28
                    <compile-dependency/>
37
                    <compile-dependency/>
(-)a/apisupport.feedreader/feedreader-suite/FeedReader/src/org/netbeans/feedreader/FeedTopComponent.java (-36 / +24 lines)
Lines 30-37 Link Here
30
package org.netbeans.feedreader;
30
package org.netbeans.feedreader;
31
31
32
import java.awt.BorderLayout;
32
import java.awt.BorderLayout;
33
import java.io.Serializable;
34
import javax.swing.ActionMap;
33
import javax.swing.ActionMap;
34
import org.netbeans.api.settings.ConvertAsProperties;
35
import org.openide.awt.ActionID;
36
import org.openide.awt.ActionReference;
35
import org.openide.explorer.ExplorerManager;
37
import org.openide.explorer.ExplorerManager;
36
import org.openide.explorer.ExplorerUtils;
38
import org.openide.explorer.ExplorerUtils;
37
import org.openide.explorer.view.BeanTreeView;
39
import org.openide.explorer.view.BeanTreeView;
Lines 41-53 Link Here
41
import org.openide.util.NbBundle;
43
import org.openide.util.NbBundle;
42
import org.openide.windows.TopComponent;
44
import org.openide.windows.TopComponent;
43
45
44
final class FeedTopComponent extends TopComponent implements ExplorerManager.Provider {
46
@ConvertAsProperties(dtd = "-//org.netbeans.feedreader//FeedTopComponent//EN", autostore = false)
47
@TopComponent.Description(preferredID = "FeedTopComponent", iconBase="org/netbeans/feedreader/rss16.gif", 
48
persistenceType = TopComponent.PERSISTENCE_ALWAYS)
49
@TopComponent.Registration(mode = "explorer", openAtStartup = true)
50
@ActionID(category = "Window", id = "org.netbeans.feedreader.FeedTopComponent")
51
@ActionReference(path = "Menu/Window", position=10)
52
@TopComponent.OpenActionRegistration(displayName = "#CTL_FeedAction", preferredID = "FeedTopComponent")
53
public final class FeedTopComponent extends TopComponent implements ExplorerManager.Provider {
45
54
46
    private static FeedTopComponent instance;
55
    private static FeedTopComponent instance;
47
    
48
    private final ExplorerManager manager = new ExplorerManager();
56
    private final ExplorerManager manager = new ExplorerManager();
49
    private final BeanTreeView view = new BeanTreeView();
57
    private final BeanTreeView view = new BeanTreeView();
50
    
58
51
    private FeedTopComponent() {
59
    private FeedTopComponent() {
52
        setName(NbBundle.getMessage(FeedTopComponent.class, "CTL_FeedTopComponent"));
60
        setName(NbBundle.getMessage(FeedTopComponent.class, "CTL_FeedTopComponent"));
53
        setToolTipText(NbBundle.getMessage(FeedTopComponent.class, "HINT_FeedTopComponent"));
61
        setToolTipText(NbBundle.getMessage(FeedTopComponent.class, "HINT_FeedTopComponent"));
Lines 64-104 Link Here
64
        map.put("delete", ExplorerUtils.actionDelete(manager, true));
72
        map.put("delete", ExplorerUtils.actionDelete(manager, true));
65
        associateLookup(ExplorerUtils.createLookup(manager, map));
73
        associateLookup(ExplorerUtils.createLookup(manager, map));
66
    }
74
    }
67
    
75
68
    public static synchronized FeedTopComponent getDefault() {
76
    void writeProperties(java.util.Properties p) {
69
        if (instance == null) {
77
        // better to version settings since initial version as advocated at
70
            instance = new FeedTopComponent();
78
        // http://wiki.apidesign.org/wiki/PropertyFiles
71
        }
79
        p.setProperty("version", "1.0");
72
        return instance;
80
        // TODO store your settings
73
    }
81
    }
74
    
82
75
    @Override
83
    void readProperties(java.util.Properties p) {
76
    public int getPersistenceType() {
84
        String version = p.getProperty("version");
77
        return TopComponent.PERSISTENCE_ALWAYS;
85
        // TODO read your settings according to their version
78
    }
86
    }
79
    
87
80
    @Override
81
    protected String preferredID() {
82
        return "FeedTopComponent";
83
    }
84
    
85
    @Override
86
    protected Object writeReplace() {
87
        return new ResolvableHelper();
88
    }
89
    
90
    private static final class ResolvableHelper implements Serializable {
91
        
92
        private static final long serialVersionUID = 1L;
93
        
94
        public Object readResolve() {
95
            return FeedTopComponent.getDefault();
96
        }
97
        
98
    }
99
    
100
    public ExplorerManager getExplorerManager() {
88
    public ExplorerManager getExplorerManager() {
101
        return manager;
89
        return manager;
102
    }
90
    }
103
    
91
104
}
92
}
(-)a/apisupport.feedreader/feedreader-suite/FeedReader/src/org/netbeans/feedreader/FeedTopComponentSettings.xml (-36 lines)
Lines 1-36 Link Here
1
<?xml version="1.0"?>
2
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
3
<!--
4
  Copyright (c) 2010, Oracle. All rights reserved.
5
6
  Redistribution and use in source and binary forms, with or without
7
  modification, are permitted provided that the following conditions are met:
8
9
  * Redistributions of source code must retain the above copyright notice,
10
    this list of conditions and the following disclaimer.
11
12
  * Redistributions in binary form must reproduce the above copyright notice,
13
    this list of conditions and the following disclaimer in the documentation
14
    and/or other materials provided with the distribution.
15
16
  * Neither the name of Oracle nor the names of its contributors
17
    may be used to endorse or promote products derived from this software without
18
    specific prior written permission.
19
20
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30
  THE POSSIBILITY OF SUCH DAMAGE.
31
-->
32
<settings version="1.0">
33
    <module name="org.netbeans.feedreader" spec="1.0"/>
34
    <instanceof class="org.openide.windows.TopComponent"/>
35
    <instance class="org.netbeans.feedreader.FeedTopComponent" method="getDefault"/>
36
</settings>
(-)a/apisupport.feedreader/feedreader-suite/FeedReader/src/org/netbeans/feedreader/FeedTopComponentWstcref.xml (-40 lines)
Lines 1-40 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!DOCTYPE tc-ref PUBLIC
4
          "-//NetBeans//DTD Top Component in Mode Properties 2.0//EN"
5
          "http://www.netbeans.org/dtds/tc-ref2_0.dtd">
6
		<!--
7
		  Copyright (c) 2010, Oracle. All rights reserved.
8
9
		  Redistribution and use in source and binary forms, with or without
10
		  modification, are permitted provided that the following conditions are met:
11
12
		  * Redistributions of source code must retain the above copyright notice,
13
		    this list of conditions and the following disclaimer.
14
15
		  * Redistributions in binary form must reproduce the above copyright notice,
16
		    this list of conditions and the following disclaimer in the documentation
17
		    and/or other materials provided with the distribution.
18
19
		  * Neither the name of Oracle nor the names of its contributors
20
		    may be used to endorse or promote products derived from this software without
21
		    specific prior written permission.
22
23
		  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
		  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
		  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
		  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
		  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
		  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
		  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
		  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
		  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
		  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33
		  THE POSSIBILITY OF SUCH DAMAGE.
34
		-->
35
36
<tc-ref version="2.0" >
37
    <module name="org.netbeans.feedreader" spec="1.0" />
38
    <tc-id id="FeedTopComponent" />
39
    <state opened="true" />
40
</tc-ref>
(-)a/apisupport.feedreader/feedreader-suite/FeedReader/src/org/netbeans/feedreader/layer.xml (-27 lines)
Lines 30-45 Link Here
30
  THE POSSIBILITY OF SUCH DAMAGE.
30
  THE POSSIBILITY OF SUCH DAMAGE.
31
-->
31
-->
32
<filesystem>
32
<filesystem>
33
    <folder name="Actions">
34
        <folder name="Window">
35
            <file name="org-netbeans-feedreader-FeedAction.instance">
36
                <attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/>
37
                <attr name="component" methodvalue="org.netbeans.feedreader.FeedTopComponent.getDefault"/>
38
                <attr name="displayName" bundlevalue="org.netbeans.feedreader.Bundle#CTL_FeedAction"/>
39
                <attr name="iconBase" stringvalue="org/netbeans/feedreader/rss16.gif"/>
40
            </file>
41
        </folder>
42
    </folder>
43
    <folder name="Menu">
33
    <folder name="Menu">
44
        <folder name="File">
34
        <folder name="File">
45
            <file name="org-openide-actions-SaveAction.shadow_hidden"/>
35
            <file name="org-openide-actions-SaveAction.shadow_hidden"/>
Lines 50-62 Link Here
50
            <file name="org-netbeans-core-actions-HTMLViewAction.shadow_hidden"/>
40
            <file name="org-netbeans-core-actions-HTMLViewAction.shadow_hidden"/>
51
            <file name="org-netbeans-core-actions-LogAction.shadow_hidden"/>
41
            <file name="org-netbeans-core-actions-LogAction.shadow_hidden"/>
52
        </folder>
42
        </folder>
53
        <folder name="Window">
54
            <file name="FeedAction.shadow">
55
                <attr name="originalFile" stringvalue="Actions/Window/org-netbeans-feedreader-FeedAction.instance"/>
56
                <attr name="position" intvalue="777"/>
57
            </file>
58
            <file name="org-netbeans-core-windows-actions-GlobalPropertiesAction.shadow_hidden"/>
59
        </folder>
60
    </folder>
43
    </folder>
61
    <folder name="RssFeeds">
44
    <folder name="RssFeeds">
62
        <file name="sample.instance">
45
        <file name="sample.instance">
Lines 67-80 Link Here
67
        <file name="Memory_hidden"/>
50
        <file name="Memory_hidden"/>
68
        <file name="UndoRedo_hidden"/>
51
        <file name="UndoRedo_hidden"/>
69
    </folder>
52
    </folder>
70
    <folder name="Windows2">
71
        <folder name="Components">
72
            <file name="FeedTopComponent.settings" url="FeedTopComponentSettings.xml"/>
73
        </folder>
74
        <folder name="Modes">
75
            <folder name="explorer">
76
                <file name="FeedTopComponent.wstcref" url="FeedTopComponentWstcref.xml"/>
77
            </folder>
78
        </folder>
79
    </folder>
80
</filesystem>
53
</filesystem>
(-)a/apisupport.feedreader/feedreader-suite/nbproject/build-impl.xml (+7 lines)
Lines 38-42 Link Here
38
            </not>
38
            </not>
39
        </condition>
39
        </condition>
40
    </fail>
40
    </fail>
41
    <fail message="Cannot find NetBeans build harness. ${line.separator}Check that nbplatform.${nbplatform.active}.netbeans.dest.dir and nbplatform.${nbplatform.active}.harness.dir are defined. ${line.separator}On a developer machine these are normally defined in ${user.properties.file}=${netbeans.user}/build.properties ${line.separator}but for automated builds you should pass these properties to Ant explicitly.">
42
        <condition>
43
            <not>
44
                <available type="dir" file="${harness.dir}"/>
45
            </not>
46
        </condition>
47
    </fail>
41
    <import file="${harness.dir}/suite.xml"/>
48
    <import file="${harness.dir}/suite.xml"/>
42
</project>
49
</project>
(-)a/apisupport.feedreader/feedreader-suite/nbproject/genfiles.properties (-3 / +3 lines)
Lines 1-8 Link Here
1
build.xml.data.CRC32=a89c5057
1
build.xml.data.CRC32=a89c5057
2
build.xml.script.CRC32=9a0e0f71
2
build.xml.script.CRC32=9a0e0f71
3
build.xml.stylesheet.CRC32=531c622b@1.30.0.7
3
build.xml.stylesheet.CRC32=eaf9f76a@1.44
4
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
4
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
5
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6
nbproject/build-impl.xml.data.CRC32=a89c5057
6
nbproject/build-impl.xml.data.CRC32=a89c5057
7
nbproject/build-impl.xml.script.CRC32=7f46473b
7
nbproject/build-impl.xml.script.CRC32=6245c318
8
nbproject/build-impl.xml.stylesheet.CRC32=2f5f2db8@1.30.0.7
8
nbproject/build-impl.xml.stylesheet.CRC32=183e6ef3@1.44

Return to bug 193724