Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public void menuAboutToHide(IMenuManager manager) {
* {@link MDynamicMenuContribution} application model elements
*/
private void processDynamicElements(MMenu menuModel, MenuManager menuManager) {
MMenuElement[] menuElements = menuModel.getChildren().toArray(
new MMenuElement[menuModel.getChildren().size()]);
List<MMenuElement> children = menuModel.getChildren();
MMenuElement[] menuElements = children.toArray(new MMenuElement[children.size()]);
for (MMenuElement currentMenuElement : menuElements) {

if (currentMenuElement instanceof MDynamicMenuContribution dmc) {
Expand Down Expand Up @@ -154,9 +154,9 @@ private void processDynamicElements(MMenu menuModel, MenuManager menuManager) {
if (mel.size() > 0) {

int position = 0;
while (position < menuModel.getChildren().size()) {
if (currentMenuElement == menuModel.getChildren().get(
position)) {
children = menuModel.getChildren();
while (position < children.size()) {
if (currentMenuElement == children.get(position)) {
position++;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3423,16 +3423,18 @@ public void resetPerspective() {
// Hide placeholders for parts that exist in the 'global' areas
modelService.hideLocalPlaceholders(window, dummyPerspective);

int dCount = dummyPerspective.getChildren().size();
while (!dummyPerspective.getChildren().isEmpty()) {
MPartSashContainerElement dChild = dummyPerspective.getChildren().remove(0);
persp.getChildren().add(dChild);
List<MPartSashContainerElement> dummyChildren = dummyPerspective.getChildren();
List<MPartSashContainerElement> perspChildren = persp.getChildren();
int dCount = dummyChildren.size();
while (!dummyChildren.isEmpty()) {
MPartSashContainerElement dChild = dummyChildren.remove(0);
perspChildren.add(dChild);
}

while (persp.getChildren().size() > dCount) {
MUIElement child = persp.getChildren().get(0);
while (perspChildren.size() > dCount) {
MUIElement child = perspChildren.get(0);
child.setToBeRendered(false);
persp.getChildren().remove(0);
perspChildren.remove(0);
}

List<MWindow> existingDetachedWindows = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ private static class CategoryNode {

CategoryNode(Category cat) {
category = cat;
path = ""; //$NON-NLS-1$
String[] categoryPath = category.getParentPath();
StringBuilder pathBuilder = new StringBuilder();
if (categoryPath != null) {
for (String parentPath : categoryPath) {
path += parentPath + '/';
pathBuilder.append(parentPath).append('/');
}
}
path += cat.getId();
pathBuilder.append(cat.getId());
path = pathBuilder.toString();
}

String getPath() {
Expand Down
Loading