Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
Preserve order for sgen model selection wizard (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasmuelder authored and tkutz committed May 8, 2017
1 parent 6ab8699 commit 250a691
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,14 @@ public void createControl(Composite parent) {
container.setLayout(new GridLayout(1, false));
createGeneratorCombo(container);
createObjectTree(container);
refreshInput();
}

@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
refreshInput();
}

private void createObjectTree(Composite container) {
lblNewLabel = new Label(container, SWT.NONE);
lblNewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
package org.yakindu.sct.ui.wizards;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

import org.eclipse.core.resources.IContainer;
Expand Down Expand Up @@ -85,7 +85,7 @@ else if (member instanceof IFile && ((IFile) member).getFileExtension().equals(f
}

public Object[] filterForContent(Object[] inputElements) throws CoreException {
final Set<Object> result = new HashSet<Object>();
final Set<Object> result = new LinkedHashSet<Object>();
for (final Object obj : inputElements) {
((IResource) obj).accept(new IResourceVisitor() {
public boolean visit(IResource resource) throws CoreException {
Expand Down

0 comments on commit 250a691

Please sign in to comment.