Skip to content

Commit

Permalink
Add Dashboard API and use to provide replacement for Welcome page in …
Browse files Browse the repository at this point in the history
…IDE.

Provides an in-development dashboard API and SPI in the platform for showing
widgets. Widgets provide a way of contextually grouping actions, text, images
and links.

Provides an alternative to the Welcome page in the IDE using the new API.
  • Loading branch information
neilcsmith-net committed Apr 10, 2024
1 parent b70fb8b commit fda32dd
Show file tree
Hide file tree
Showing 37 changed files with 4,495 additions and 21 deletions.
1 change: 1 addition & 0 deletions ide/projectui/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
<friend>com.oracle.tools.ide.welcome</friend>
<friend>com.sun.tools.swdev.sunstudio</friend>
<friend>org.netbeans.modules.apisupport.ant</friend>
<friend>org.netbeans.modules.ide.dashboard</friend>
<friend>org.netbeans.modules.java.j2seproject</friend>
<friend>org.netbeans.modules.maven</friend>
<friend>org.netbeans.modules.welcome</friend>
Expand Down
1 change: 1 addition & 0 deletions ide/utilities/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
<friend-packages>
<friend>org.netbeans.modules.cnd.utils</friend>
<friend>org.netbeans.modules.dlight.remote.impl</friend>
<friend>org.netbeans.modules.ide.dashboard</friend>
<friend>org.netbeans.modules.utilities.project</friend>
<friend>org.netbeans.modules.visualweb.gravy</friend>
<friend>io.github.jeddict.jpa.modeler</friend>
Expand Down
12 changes: 6 additions & 6 deletions ide/utilities/src/org/netbeans/modules/openfile/RecentFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ public final class RecentFiles {
private RecentFiles() {
}

static void addPropertyChangeListener(PropertyChangeListener l) {
public static void addPropertyChangeListener(PropertyChangeListener l) {
PCH_SUPPORT.addPropertyChangeListener(l);
}

static void removePropertyChangeListener(PropertyChangeListener l) {
public static void removePropertyChangeListener(PropertyChangeListener l) {
PCH_SUPPORT.removePropertyChangeListener(l);
}

Expand All @@ -117,7 +117,7 @@ public void run() {
}

/** Returns read-only list of recently closed files */
static List<HistoryItem> getRecentFiles() {
public static List<HistoryItem> getRecentFiles() {
synchronized (HISTORY_LOCK) {
checkHistory();
return Collections.unmodifiableList(history);
Expand Down Expand Up @@ -422,7 +422,7 @@ static void pruneHistory() {
* One item of the recently closed files history.
* Comparable by the time field, ascending from most recent to older items.
*/
static final class HistoryItem implements Comparable<HistoryItem> {
public static final class HistoryItem implements Comparable<HistoryItem> {

private int id;
private String path;
Expand Down Expand Up @@ -469,14 +469,14 @@ public Icon getIcon() {
* Set icon of this history item. The icon can be set after
* initialization, usually after it was loaded in a background thread.
*/
public void setIcon(Icon icon) {
void setIcon(Icon icon) {
this.icon = icon;
}

/**
* Return bytes for the icon, or null if no icon is specified.
*/
public byte[] getIconBytes() {
byte[] getIconBytes() {
return iconToBytes(icon);
}

Expand Down
10 changes: 5 additions & 5 deletions nb/ide.branding.kit/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.ide.kit</code-name-base>
<code-name-base>org.netbeans.modules.ide.dashboard</code-name-base>
<run-dependency>
<specification-version>1.0</specification-version>
<release-version>0</release-version>
<specification-version>0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.welcome</code-name-base>
<code-name-base>org.netbeans.modules.ide.kit</code-name-base>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.12</specification-version>
<specification-version>1.0</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
<attr name="originalFile" stringvalue="Actions/Tools/org-netbeans-modules-jumpto-file-FileSearchAction.instance"/>
<attr name="position" intvalue="500"/>
</file>
<file name="org-netbeans-modules-welcome-ShowWelcomeAction.shadow">
<attr name="originalFile" stringvalue="Actions/Help/org-netbeans-modules-welcome-ShowWelcomeAction.instance"/>
<file name="org-netbeans-modules-dashboard-ShowDashboardAction.shadow">
<attr name="originalFile" stringvalue="Actions/Window/org-netbeans-modules-dashboard-ShowDashboardAction.instance"/>
<attr name="position" intvalue="600"/>
</file>
</folder>
Expand Down
24 changes: 24 additions & 0 deletions nb/ide.dashboard/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project basedir="." default="build" name="nb/ide.dashboard">
<import file="../../nbbuild/templates/projectized.xml"/>
</project>
7 changes: 7 additions & 0 deletions nb/ide.dashboard/manifest.mf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Manifest-Version: 1.0
OpenIDE-Module-Specification-Version: 0.1
OpenIDE-Module: org.netbeans.modules.ide.dashboard/0
OpenIDE-Module-Layer: org/netbeans/modules/ide/dashboard/resources/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/ide/dashboard/Bundle.properties
AutoUpdate-Show-In-Client: false
OpenIDE-Module-Java-Dependencies: Java > 17
21 changes: 21 additions & 0 deletions nb/ide.dashboard/nbproject/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

javac.compilerargs=-Xlint:unchecked
javac.source=17
javac.target=17

156 changes: 156 additions & 0 deletions nb/ide.dashboard/nbproject/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.apisupport.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
<code-name-base>org.netbeans.modules.ide.dashboard</code-name-base>
<!--<test-dependencies>
<test-type>
<name>unit</name>
<test-dependency>
<code-name-base>org.netbeans.libs.junit4</code-name-base>
<compile-dependency/>
</test-dependency>
<test-dependency>
<code-name-base>org.netbeans.modules.nbjunit</code-name-base>
<recursive/>
<compile-dependency/>
</test-dependency>
</test-type>
</test-dependencies>-->
<module-dependencies>
<dependency>
<code-name-base>org.netbeans.api.dashboard</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>0</release-version>
<specification-version>0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.api.progress</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.72</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.options.api</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.69</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.95</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectui</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.83</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectuiapi.base</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.110</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.utilities</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.85</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.awt</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.92</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.dialogs</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.71</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.filesystems</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.37</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.32</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util.lookup</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.58</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util.ui</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.33</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
<public-packages/>
</data>
</configuration>
</project>
Loading

0 comments on commit fda32dd

Please sign in to comment.