Skip to content

Commit

Permalink
Merge branch 'master' into 2.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
olas committed Dec 29, 2011
2 parents 4c5c83d + f35f9ba commit 34e6613
Show file tree
Hide file tree
Showing 4 changed files with 23 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
Expand Up @@ -91,6 +91,14 @@ public void open( final IBioObject bioObject, final String editor)
@TestMethods("testSaveAndRemove_String")
public void save(String filePath, InputStream toWrite);

@Recorded
@PublishedMethod(
params = "String filePath, String content",
methodSummary = "Save the content of the String to the given path."
)
public void save(String filePath, String toWrite);


@Recorded
@TestMethods("testSaveAndRemove_IFile")
public void save( IFile file,
Expand Down
Expand Up @@ -191,6 +191,12 @@ public void save( IFile target,
save ( target, toWrite, null, monitor);
}

public void save( IFile target,
String toWrite,
IProgressMonitor monitor ) {
save ( target, new ByteArrayInputStream(toWrite.getBytes()), null, monitor);
}

public void save( final IFile target,
InputStream toWrite,
Runnable callbackFunction,
Expand Down

0 comments on commit 34e6613

Please sign in to comment.