Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Created Bioclipse Search viewpart
  • Loading branch information
jonalv committed Sep 1, 2015
1 parent c75f066 commit 7d7ed69
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/net.bioclipse.ui.search/.classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
28 changes: 28 additions & 0 deletions plugins/net.bioclipse.ui.search/.project
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.bioclipse.ui.search</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
10 changes: 10 additions & 0 deletions plugins/net.bioclipse.ui.search/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Search
Bundle-SymbolicName: net.bioclipse.ui.search;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.e4.ui.di,
org.eclipse.swt,
org.eclipse.ui,
org.eclipse.core.runtime;bundle-version="3.10.0"
5 changes: 5 additions & 0 deletions plugins/net.bioclipse.ui.search/build.properties
@@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
16 changes: 16 additions & 0 deletions plugins/net.bioclipse.ui.search/plugin.xml
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<view
class="net.bioclipse.ui.search.BioclipseUISearchPart"
id="net.bioclipse.search.BioclipseSearch"
name="Search"
category="net.bioclipse.ui.category"
icon=""
allowMultiple="false"
restorable="true">
</view>
</extension>
</plugin>
@@ -0,0 +1,46 @@
package net.bioclipse.ui.search;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.eclipse.e4.ui.di.Focus;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TableColumn;

public class BioclipseSearch {
private Table table;

public BioclipseSearch() {
}

/**
* Create contents of the view part.
*/
@PostConstruct
public void createControls(Composite parent) {

table = new Table(parent, SWT.BORDER | SWT.FULL_SELECTION);
table.setHeaderVisible(true);
table.setLinesVisible(true);

TableColumn tblclmnSearch = new TableColumn(table, SWT.NONE);
tblclmnSearch.setWidth(100);
tblclmnSearch.setText("Search");

TableColumn tblclmnhits = new TableColumn(table, SWT.NONE);
tblclmnhits.setWidth(100);
tblclmnhits.setText("#hits");
}

@PreDestroy
public void dispose() {
}

@Focus
public void setFocus() {
// TODO Set the focus to control
}

}
@@ -0,0 +1,23 @@
package net.bioclipse.ui.search;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

public class BioclipseUISearchPart extends ViewPart {

private BioclipseSearch search;

public BioclipseUISearchPart() {
this.search = new BioclipseSearch();
}

@Override
public void createPartControl(Composite arg0) {
search.createControls(arg0);
}

@Override
public void setFocus() {
search.setFocus();
}
}

0 comments on commit 7d7ed69

Please sign in to comment.