Skip to content

Commit

Permalink
Added functionality to open HTML files in Rich Browser
Browse files Browse the repository at this point in the history
  • Loading branch information
olas committed Dec 29, 2011
1 parent 1da81e0 commit f35f9ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion plugins/net.bioclipse.browser/META-INF/MANIFEST.MF
Expand Up @@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.ui,
net.bioclipse.core,
org.eclipse.core.resources,
net.bioclipse.browser.business,
net.bioclipse.ui.business
net.bioclipse.ui.business,
org.eclipse.ui.ide
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package: org.apache.log4j
Expand Down
Expand Up @@ -30,6 +30,7 @@
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.part.FileEditorInput;

/**
*
Expand Down Expand Up @@ -71,13 +72,17 @@ public boolean isSaveAsAllowed() {
@Override
public void createPartControl( Composite parent ) {

System.out.println("weee");

int style = BrowserViewer.LOCATION_BAR;
style += BrowserViewer.BUTTON_BAR;

webBrowser = new BrowserViewer(parent, style);

if (getEditorInput() instanceof FileEditorInput) {
FileEditorInput finput = (FileEditorInput) getEditorInput();
webBrowser.setURL(finput.getFile().getLocation().toString());
setPartName(finput.getFile().getName());
}

webBrowser.getBrowser().addProgressListener(new ProgressListener() {

public void completed(ProgressEvent event) {
Expand Down

0 comments on commit f35f9ba

Please sign in to comment.