Skip to content

Commit c9c6fab

Browse files
Evgueni DrioukEvgueni Driouk
authored andcommitted
version 2.4.1 : bugfixes
1 parent 803b3dc commit c9c6fab

13 files changed

Lines changed: 81 additions & 38 deletions

File tree

com.arm.cmsis.help/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Help
44
Bundle-SymbolicName: com.arm.cmsis.help;singleton:=true
5-
Bundle-Version: 2.4.0.qualifier
5+
Bundle-Version: 2.4.1.qualifier
66
Bundle-Activator: com.arm.cmsis.help.HelpPlugIn
77
Bundle-Vendor: ARM
88
Require-Bundle: org.eclipse.ui,

com.arm.cmsis.help/html/reference/pack_manager.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ <h2>
2525
</li>
2626
<li><b>Window &rarr; Preferences &rarr; CMSIS Packs</b> to setup the root folder for storing packs:
2727
<ul>
28-
<li>For Linux, the default root folder is set to <i>$HOME/.arm/CMSIS-Packs</i>.</li>
29-
<li>For Windows, the default root folder is set to <i>%APPDATA%\ARM\CMSIS-Packs.</i></li>
28+
<li>For Windows, the default root folder is set to <i>%LOCALAPPDATA%\Arm\Packs</i></li>
29+
<li>For Linux, the default root folder is set to <i>$XDG_CACHE_HOME/arm/packs (where $XDG_CACHE_HOME defaults to $HOME/.cache)</li>
3030
</ul>
3131
</li>
3232
</ul>

com.arm.cmsis.pack.common/src/com/arm/cmsis/pack/common/CmsisConstants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ public class CmsisConstants {
138138
static public final String WIN = "win"; //$NON-NLS-1$
139139
static public final String LINUX = "linux"; //$NON-NLS-1$
140140
static public final String MAC = "mac"; //$NON-NLS-1$
141+
static public final String NIX = "nix"; //$NON-NLS-1$
142+
static public final String NUX = "nux"; //$NON-NLS-1$
141143

142144
static public final String EXE = "exe"; //$NON-NLS-1$
143145
static public final String ECLIPSE = "eclipse"; //$NON-NLS-1$

com.arm.cmsis.pack.data/src/com/arm/cmsis/pack/data/CpPackCollection.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,17 @@ public void addChild(ICpItem item) {
119119
@Override
120120
public Collection<ICpPack> getPacks() {
121121
Set<ICpPack> packs = new TreeSet<ICpPack>(new CpPackComparator());
122-
for(ICpPackFamily f : fPackFamilies.values()) {
123-
Collection<ICpPack> familyPacks = f.getPacks();
124-
if(familyPacks == null) {
125-
continue;
126-
}
127-
for(ICpPack pack : familyPacks) {
128-
if (pack.getPackState().isInstalledOrLocal() ||
129-
pack.isLatest()) {
130-
packs.add(pack);
122+
if(fPackFamilies != null) {
123+
for(ICpPackFamily f : fPackFamilies.values()) {
124+
Collection<ICpPack> familyPacks = f.getPacks();
125+
if(familyPacks == null) {
126+
continue;
127+
}
128+
for(ICpPack pack : familyPacks) {
129+
if (pack.getPackState().isInstalledOrLocal() ||
130+
pack.isLatest()) {
131+
packs.add(pack);
132+
}
131133
}
132134
}
133135
}

com.arm.cmsis.pack.installer.ui/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %Bundle-Name
44
Bundle-SymbolicName: com.arm.cmsis.pack.installer.ui;singleton:=true
5-
Bundle-Version: 2.4.0.qualifier
5+
Bundle-Version: 2.4.1.qualifier
66
Bundle-Activator: com.arm.cmsis.pack.installer.ui.CpInstallerPlugInUI
77
Bundle-Vendor: %Bundle-Vendor
88
Require-Bundle: org.eclipse.ui,

com.arm.cmsis.pack.installer.ui/OSGI-INF/l10n/bundle.properties

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ ExamplesView.name = Examples
99
PackPropertiesView.name = Pack Properties
1010
PackManagerPerspective.name = CMSIS Pack Manager
1111
UpdateCommand.tooltip = Check for Updates on Web
12-
ImportCommand.tooltip = Import existing packs
1312
ReloadCommand.tooltip = Reload Packs in the CMSIS Pack root folder
1413
PackManagerCommands.name = Pack Manager Commands
1514
UpdateCommand.name = Check for Updates on Web
16-
ImportCommand.name = Import Existing Packs
1715
ReloadCommand.name = Reload Packs in the CMSIS Pack root folder
1816
PackManagerToolbar.label = Pack Manager Toolbar
1917
UpdateCommand.label = Check for Updates on Web
20-
ImportCommand.label = Import existing packs
21-
ReloadCommand.label = Reload Packs in the CMSIS Pack root folder
18+
ImportCommand.name = Import Existing Packs...
19+
ImportCommand.label = Import existing packs...
20+
ImportCommand.tooltip = Import existing packs...
21+
ReloadCommand.label = Reload Packs in the CMSIS Pack root folder
22+
ImportPacksFromFolderCommand.name = Import Packs from Folder...
23+
ImportPacksFromFolderCommand.label = Import Packs from Folder...
24+
ImportPacksFromFolderCommand.tooltip = Import Packs from Folder...
25+
ManageLocalRepositoriesCommand.label = Manage Local Repositories...
26+
ManageLocalRepositoriesCommand.tooltip = Manage Local Repositories...
27+
ManageLocalRepositoriesCommand.name = Manage Local Repositories...

com.arm.cmsis.pack.installer.ui/build.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ bin.includes = META-INF/,\
44
.,\
55
plugin.xml,\
66
icons/,\
7-
OSGI-INF/
7+
OSGI-INF/,\
8+
OSGI-INF/l10n/bundle.properties

com.arm.cmsis.pack.installer.ui/plugin.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@
111111
<command
112112
commandId="com.arm.cmsis.pack.installer.commands.importFolderPacksCommand"
113113
icon="icons/import_folder.gif"
114-
label="Import Packs from Folder"
114+
label="%ImportPacksFromFolderCommand.label"
115115
style="push"
116-
tooltip="Import Packs from Folder">
116+
tooltip="%ImportPacksFromFolderCommand.tooltip">
117117
<visibleWhen
118118
checkEnabled="false">
119119
<with
@@ -127,9 +127,9 @@
127127
<command
128128
commandId="com.arm.cmsis.pack.installer.commands.manLocalRepoCommand"
129129
icon="icons/edit_repository.png"
130-
label="Manage Local Repositories"
130+
label="%ManageLocalRepositoriesCommand.label"
131131
style="push"
132-
tooltip="Manage Local Repositories">
132+
tooltip="%ManageLocalRepositoriesCommand.tooltip">
133133
<visibleWhen
134134
checkEnabled="false">
135135
<with
@@ -166,12 +166,12 @@
166166
<command
167167
categoryId="com.arm.cmsis.pack.installer.commands"
168168
id="com.arm.cmsis.pack.installer.commands.importFolderPacksCommand"
169-
name="Import Packs from Folder">
169+
name="%ImportPacksFromFolderCommand.name">
170170
</command>
171171
<command
172172
categoryId="com.arm.cmsis.pack.installer.commands"
173173
id="com.arm.cmsis.pack.installer.commands.manLocalRepoCommand"
174-
name="Manage Local Repositories">
174+
name="%ManageLocalRepositoriesCommand.name">
175175
</command>
176176
</extension>
177177
<extension

com.arm.cmsis.pack.installer.ui/src/com/arm/cmsis/pack/installer/ui/views/PackInstallerViewUtils.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,25 @@
2323
*/
2424
public class PackInstallerViewUtils {
2525

26+
private static final String[][] VIEW_MENU_COMMANDS = { // id, image
27+
{ "com.arm.cmsis.pack.installer.commands.reloadCommand", CpPlugInUI.ICON_REFRESH }, //$NON-NLS-1$
28+
{ "com.arm.cmsis.pack.installer.commands.updateCommand", CpPlugInUI.ICON_CHECK4UPDATE }, //$NON-NLS-1$
29+
{ "com.arm.cmsis.pack.installer.commands.importPackCommand", CpPlugInUI.ICON_RTE_UNPACK }, //$NON-NLS-1$
30+
{ "com.arm.cmsis.pack.installer.commands.importFolderPacksCommand", CpPlugInUI.ICON_IMPORT_FOLDER }, //$NON-NLS-1$
31+
{ "com.arm.cmsis.pack.installer.commands.manLocalRepoCommand", CpPlugInUI.ICON_MAN_LOCAL_REPO } //$NON-NLS-1$
32+
};
33+
2634
/**
2735
* Add the Management Commands to the Local Tool bar
2836
* @param viewPart the view part, e.g. PacksView, ExamplesView...
2937
* @param manager the contributionManager
3038
*/
3139
public static void addManagementCommandsToLocalToolBar(IViewPart viewPart, IContributionManager manager) {
32-
String[][] commands = { // id, image
33-
{ "com.arm.cmsis.pack.installer.commands.reloadCommand", CpPlugInUI.ICON_REFRESH }, //$NON-NLS-1$
34-
{ "com.arm.cmsis.pack.installer.commands.updateCommand", CpPlugInUI.ICON_CHECK4UPDATE }, //$NON-NLS-1$
35-
{ "com.arm.cmsis.pack.installer.commands.importPackCommand", CpPlugInUI.ICON_RTE_UNPACK }, //$NON-NLS-1$
36-
{ "com.arm.cmsis.pack.installer.commands.importFolderPacksCommand", CpPlugInUI.ICON_IMPORT_FOLDER }, //$NON-NLS-1$
37-
{ "com.arm.cmsis.pack.installer.commands.manLocalRepoCommand", CpPlugInUI.ICON_MAN_LOCAL_REPO } //$NON-NLS-1$
38-
};
39-
40-
for (int i = 0; i < commands.length; i++) {
41-
String commandId = commands[i][0];
40+
for (int i = 0; i < VIEW_MENU_COMMANDS.length; i++) {
41+
String commandId = VIEW_MENU_COMMANDS[i][0];
4242
CommandContributionItemParameter p = new CommandContributionItemParameter(viewPart.getSite(), commandId, commandId,
4343
CommandContributionItem.STYLE_PUSH);
44-
p.icon = CpPlugInUI.getImageDescriptor(commands[i][1]);
44+
p.icon = CpPlugInUI.getImageDescriptor(VIEW_MENU_COMMANDS[i][1]);
4545
CommandContributionItem item = new CommandContributionItem(p);
4646
manager.add(item);
4747
}

com.arm.cmsis.pack.project/src/com/arm/cmsis/pack/configuration/IRteConfiguration.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import com.arm.cmsis.pack.info.ICpConfigurationInfo;
2727
import com.arm.cmsis.pack.info.ICpDeviceInfo;
2828
import com.arm.cmsis.pack.info.ICpFileInfo;
29+
import com.arm.cmsis.pack.info.ICpPackInfo;
30+
import com.arm.cmsis.pack.rte.IRteModel;
2931
import com.arm.cmsis.pack.rte.dependencies.IRteDependencyItem;
3032

3133
/**
@@ -45,6 +47,13 @@ public interface IRteConfiguration extends IAdaptable, IEvaluationResult {
4547
* @return ICpConfigurationInfo read from .rteconfig file
4648
*/
4749
void setConfigurationInfo(ICpConfigurationInfo info);
50+
51+
52+
/**
53+
* Returns the underlying RTE Model
54+
* @return IRteModel or null if configuration is not initialized yet
55+
*/
56+
default IRteModel getRteModel() { return null;}
4857

4958
/**
5059
* Returns device info stored in the configuration
@@ -57,6 +66,18 @@ public interface IRteConfiguration extends IAdaptable, IEvaluationResult {
5766
* @return ICpDebugConfiguration
5867
*/
5968
ICpDebugConfiguration getDebugConfiguration();
69+
70+
71+
/**
72+
* Returns packs currently used by configuration
73+
* @return map id to ICpPackInfo or null if configuration is not yet initialized
74+
*/
75+
default Map<String, ICpPackInfo> getUsedPackInfos(){
76+
IRteModel model = getRteModel();
77+
if(model != null)
78+
return model.getUsedPackInfos();
79+
return null;
80+
}
6081

6182
/**
6283
* Returns collection of files to add to project

0 commit comments

Comments
 (0)