fix typos
This commit is contained in:
parent
ec8d54dca3
commit
ffbffd88f1
|
@ -86,7 +86,7 @@ public class E4LifeCycle {
|
|||
ContextInjectionFactory.inject(openViewHandler, ctx);
|
||||
eventBroker.unsubscribe(this);
|
||||
for(String name:opt.getSet().getData()){
|
||||
if(new File(name).exists()) openViewHandler.openViewForFile(name);
|
||||
openViewHandler.openViewForFile(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,6 +159,8 @@ public class E4LifeCycle {
|
|||
*/
|
||||
public void openViewForFile(String name){
|
||||
File file = new File(getFirstFileName(name));
|
||||
if(!file.exists())
|
||||
return;
|
||||
MPart part = partService.createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer"); //$NON-NLS-1$
|
||||
part.setLabel(file.getName());
|
||||
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app); //$NON-NLS-1$
|
||||
|
@ -172,7 +174,7 @@ public class E4LifeCycle {
|
|||
}
|
||||
|
||||
private String getFirstFileName(String name) {
|
||||
if(name.contains(":")) {
|
||||
if(name.contains(",")) {
|
||||
String[] tokens = name.split(",");
|
||||
return tokens[0];
|
||||
} else
|
||||
|
|
|
@ -32,7 +32,9 @@ public class OpenHandler {
|
|||
public void execute(Shell shell, MApplication app, EModelService modelService, EPartService partService){
|
||||
FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);
|
||||
dialog.setFilterExtensions (new String []{Messages.OpenHandler_0});
|
||||
dialog.open();
|
||||
String ret = dialog.open();
|
||||
if(ret==null)
|
||||
return;
|
||||
String path = dialog.getFilterPath();
|
||||
ArrayList<File> files = new ArrayList<File>();
|
||||
for(String fileName: dialog.getFileNames()){
|
||||
|
|
Loading…
Reference in New Issue