Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweaked for running gwt super dev mode

Add mac icon
  • Loading branch information...
commit 5ed49fd8046e4e51f6445724d59685df17e06f5f 1 parent de52a16
@xerial xerial authored
View
3  .gitignore
@@ -26,3 +26,6 @@ project/plugins/project/
# IntelliJ specific
.idea*
+
+# for Mac
+.DS_Store
View
69 project/Build.scala
@@ -43,7 +43,7 @@ object Build extends sbt.Build {
javacOptions in Compile in doc := defaultJavacOptions ++ Seq("-windowtitle", "utgb API", "-linkoffline", "http://docs.oracle.com/javase/6/docs/api/", "http://docs.oracle.com/javase/6/docs/api/"),
scalacOptions ++= Seq("-encoding", "UTF-8", "-unchecked", "-deprecation", "-feature", "-target:jvm-1.6"),
crossPaths := false,
- publishMavenStyle := true,
+// publishMavenStyle := true,
publishArtifact in Test := false,
publishTo <<= version {
v => releaseResolver(v)
@@ -51,8 +51,8 @@ object Build extends sbt.Build {
pomIncludeRepository := {
_ => false
},
- resolvers ++= Seq(
- "UTGB Repository" at "http://maven.utgenome.org/repository/artifact"),
+ //resolvers ++= Seq(
+ // "UTGB Repository" at "http://maven.utgenome.org/repository/artifact"),
parallelExecution := true,
parallelExecution in Test := false,
pomExtra := {
@@ -108,6 +108,20 @@ object Build extends sbt.Build {
"com.google.gwt.gears" % "gwt-google-apis" % "1.0.0",
"com.allen_sauer.gwt" % "gwt-dnd" % "3.1.2"
)
+
+ val tomcatVersion = "7.0.21"
+ val tomcatLib = Seq(
+ "org.apache.tomcat.embed" % "tomcat-embed-core" % tomcatVersion,
+ "org.apache.tomcat.embed" % "tomcat-embed-jasper" % tomcatVersion,
+ "org.apache.tomcat.embed" % "tomcat-embed-logging-juli" % tomcatVersion,
+ "org.apache.tomcat" % "tomcat-catalina" % tomcatVersion,
+ "org.apache.tomcat" % "tomcat-jasper" % tomcatVersion excludeAll (
+ ExclusionRule(organization = "org.eclipse.jdt.core.compiler")
+ ),
+ "org.apache.tomcat" % "tomcat-el-api" % tomcatVersion,
+ "org.apache.tomcat" % "tomcat-juli" % tomcatVersion
+ )
+
}
@@ -140,8 +154,9 @@ object Build extends sbt.Build {
description := "UTGB Core library",
libraryDependencies ++= gwtLib ++ servletLib ++ Seq(
// Add dependent jars here
- //"org.xerial" % "xerial-core" % "3.1",
- "org.xerial" % "xerial-lens" % "2.0.6",
+ "org.xerial.java" % "xerial-lens" % "2.1",
+ "org.xerial.java" % "xerial-storage" % "2.1",
+ "org.xerial" % "xerial-lens" % "3.1",
"junit" % "junit" % "4.8.1" % "test",
"org.scalatest" %% "scalatest" % "2.0.M5b" % "test",
"org.xerial.snappy" % "snappy-java" % "1.0.5-M3",
@@ -150,7 +165,6 @@ object Build extends sbt.Build {
//"org.utgenome.thirdparty" % "sam" % "1.56",
//"org.utgenome.thirdparty" % "picard" % "1.56",
"org.xerial" % "sqlite-jdbc" % "3.7.2",
- "org.xerial" % "xerial-storage" % "2.0",
"log4j" % "log4j" % "1.2.17",
"jfree" % "jfreechart" % "1.0.12",
"commons-fileupload" % "commons-fileupload" % "1.2",
@@ -160,6 +174,23 @@ object Build extends sbt.Build {
)
+
+ lazy val shell = Project(
+ id = "utgb-shell",
+ base = file("utgb-shell"),
+ settings = buildSettings ++ Seq(
+ description := "UTGB command-line tools",
+ libraryDependencies ++= tomcatLib ++ Seq(
+ "org.codehaus.plexus" % "plexus-classworlds" % "2.4",
+ "org.apache.maven" % "maven-embedder" % "3.0.4",
+ "org.sonatype.aether" % "aether-connector-wagon" % "1.11",
+ "org.apache.maven.wagon" % "wagon-http" % "1.0-beta-7",
+ "org.eclipse.jdt.core.compiler" % "ecj" % "3.5.1"
+ )
+ )
+ ) dependsOn (core % dependentScope)
+
+
lazy val web = Project(
id = "utgb-web",
base = file("utgb-web"),
@@ -184,31 +215,5 @@ object Build extends sbt.Build {
private val dependentScope = "test->test;compile->compile"
- val tomcatVersion = "7.0.21"
-
- lazy val shell = Project(
- id = "utgb-shell",
- base = file("utgb-shell"),
- settings = buildSettings ++ Seq(
- description := "UTGB command-line tools",
- libraryDependencies ++= Seq(
- "org.apache.tomcat.embed" % "tomcat-embed-core" % tomcatVersion,
- "org.apache.tomcat.embed" % "tomcat-embed-jasper" % tomcatVersion,
- "org.apache.tomcat.embed" % "tomcat-embed-logging-juli" % tomcatVersion,
- "org.apache.tomcat" % "tomcat-catalina" % tomcatVersion,
- "org.apache.tomcat" % "tomcat-jasper" % tomcatVersion excludeAll (
- ExclusionRule(organization = "org.eclipse.jdt.core.compiler")
- ),
- "org.apache.tomcat" % "tomcat-el-api" % tomcatVersion,
- "org.apache.tomcat" % "tomcat-juli" % tomcatVersion,
- "org.codehaus.plexus" % "plexus-classworlds" % "2.4",
- "org.apache.maven" % "maven-embedder" % "3.0.4",
- //"org.sonatype.aether" % "aether-connector-wagon" % "1.11",
- //"org.apache.maven.wagon" % "wagon-http" % "1.0-beta-7",
- "org.eclipse.jdt.core.compiler" % "ecj" % "3.5.1"
- )
- )
- ) dependsOn (core % dependentScope)
-
}
View
2  project/plugins.sbt
@@ -1,4 +1,4 @@
-addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.1.5")
+addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.1.6")
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0")
View
BIN  src/pack/icon-mac.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
16 utgb-core/src/main/java/org/utgenome/gwt/utgb/client/canvas/GWTGenomeCanvas.java
@@ -1248,11 +1248,11 @@ public void draw(Gene gene, List<Exon> exonList, CDS cds, int yPosition) {
canvas.saveContext();
canvas.setFillStyle(getGeneColor(gene, 0.7f));
canvas.setStrokeStyle(getGeneColor(gene, 0.7f));
- canvas.setLineWidth(0.5f);
+ canvas.setLineWidth(lineOffset);
// draw the arrow between exons
boolean isSense = gene.isSense() ? !reverse : reverse;
- double arrowHeight = geneHeight / 2.0 + 0.5;
+ double arrowHeight = geneHeight / 2.0 + lineOffset;
for (int i = 0; i < exonList.size() - 1; i++) {
Exon prev = exonList.get(i);
@@ -1260,12 +1260,12 @@ public void draw(Gene gene, List<Exon> exonList, CDS cds, int yPosition) {
int x1 = pixelPositionOnWindow(prev.getEnd());
int x2 = pixelPositionOnWindow(next.getStart());
- float yAxis = yPosition + (geneHeight / 2) + 0.5f;
+ float yAxis = yPosition + (geneHeight / 2) + lineOffset;
canvas.saveContext();
canvas.beginPath();
- canvas.moveTo(drawPosition(x1) + 0.5f, yAxis);
- canvas.lineTo(drawPosition(x2) - 0.5f, yAxis);
+ canvas.moveTo(drawPosition(x1) + lineOffset, yAxis);
+ canvas.lineTo(drawPosition(x2) - lineOffset, yAxis);
canvas.stroke();
canvas.restoreContext();
@@ -1275,9 +1275,9 @@ public void draw(Gene gene, List<Exon> exonList, CDS cds, int yPosition) {
if (!isSense)
canvas.rotate(Math.PI);
canvas.beginPath();
- canvas.moveTo(-2.0f, -arrowHeight + 1.5f);
- canvas.lineTo(1.5f, 0);
- canvas.lineTo(-2.0f, arrowHeight - 1.5f);
+ canvas.moveTo(-2.0f, -arrowHeight + (1.0f + lineOffset));
+ canvas.lineTo((1.0f + lineOffset), 0);
+ canvas.lineTo(-2.0f, arrowHeight - (1.0 + lineOffset));
canvas.stroke();
canvas.restoreContext();
}
View
2  utgb-shell/src/main/java/org/utgenome/shell/Server.java
@@ -81,7 +81,7 @@ public void execute(String[] args) throws Exception {
private TreeMap<File, Long> table = new TreeMap<File, Long>();
public void run() {
- File[] watchFolder = new File[] { new File("src/main/webapp"), new File("src/main/template"), new File("target/classes") };
+ File[] watchFolder = new File[] { new File(option.projectRoot, "src/main/webapp"), new File(option.projectRoot, "src/main/template"), new File(option.projectRoot, "target/classes") };
while (true) {
try {
View
20 utgb-shell/src/main/java/org/utgenome/shell/UTGBPortable.java
@@ -147,16 +147,16 @@ public void run() {
protected void runInGUIMode() {
try {
SwingUtilities.invokeAndWait(new Runnable() {
- public void run() {
- UTGBPortableWidget portableWidget = new UTGBPortableWidget(config);
- portableWidget.setTomcatServerLauncher(UTGBPortable.this);
- portableWidget.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- portableWidget.setLocation((int) d.getWidth() / 4, (int) d.getHeight() / 4);
- portableWidget.setVisible(true);
- portableWidget.pushStart();
- }
- });
+ public void run() {
+ UTGBPortableWidget portableWidget = new UTGBPortableWidget(config);
+ portableWidget.setTomcatServerLauncher(UTGBPortable.this);
+ portableWidget.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
+ portableWidget.setLocation((int) d.getWidth() / 4, (int) d.getHeight() / 4);
+ portableWidget.setVisible(true);
+ portableWidget.pushStart();
+ }
+ });
}
catch (Exception e) {
_logger.error(e);
View
2  utgb-web/config/common.silk
@@ -6,7 +6,7 @@
# project group name (for Maven repository)
-group: org.utgenome
# Name of the project. This name will be used for the web application's context path
--project name: utgb-core
+-project name: utgb
# java package to add/search Web Action codes
-java package: org.utgenome.gwt.utgb.server
View
2  utgb-web/pom.xml
@@ -184,7 +184,7 @@
<!-- this is relative to the pom.xml directory -->
<webResources>
<resource>
- <directory>${basedir}/war/utgb</directory>
+ <directory>${project.build.directory}/gwt/utgb</directory>
<targetPath></targetPath>
</resource>
</webResources>
View
93 utgb-web/src/main/webapp/index.jsp
@@ -1,8 +1,85 @@
-<html>
-<head>
-<title>UTGB Core</title>
-</head>
-<body>
-Welcome to UTGB Core
-</body>
-</html>
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>$projectName$ - UTGB</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <!-- Le styles -->
+ <link href="css/bootstrap.css" rel="stylesheet">
+ <link href="theme/style/utgb.css" rel="stylesheet">
+ <style type="text/css">
+ body {
+ padding-top: 60px;
+ padding-bottom: 40px;
+ }
+ .sidebar-nav {
+ padding: 9px 0;
+ }
+ </style>
+ <link href="css/bootstrap-responsive.css" rel="stylesheet">
+
+ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+ <!--[if lt IE 9]>
+ <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+ </head>
+
+ <body>
+
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container-fluid">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <a class="brand" href="./">UTGB</a>
+ <div class="nav-collapse">
+ <ul class="nav">
+ <li class="active"><a href="./"><i class="icon-home icon-white"></i> Home</a></li>
+ <li><a href="browser.html"><i class="icon-eye-open icon-white"></i> Browse</a></li>
+ </ul>
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+ </div>
+
+ <div class="container">
+ <div class="hero-unit">
+ <h2>Welcome to UTGB</h2>
+ <p><a class="btn btn-primary" href="browser.html">Browse &raquo;</a></p>
+ <p>Run "utgb gwt" and "utgb compile" to generate the browser page. </p>
+ </div>
+
+
+ <hr>
+
+ <footer>
+ <p>Powered by <a href="http://utgenome.org">UTGB Toolkit</a>. University of Tokyo</p>
+ </footer>
+ </div> <!--/.container-->
+
+ <!-- Le javascript
+ ================================================== -->
+ <!-- Placed at the end of the document so the pages load faster -->
+ <script src="js/jquery.js"></script>
+ <script src="js/bootstrap-transition.js"></script>
+ <script src="js/bootstrap-alert.js"></script>
+ <script src="js/bootstrap-modal.js"></script>
+ <script src="js/bootstrap-dropdown.js"></script>
+ <script src="js/bootstrap-scrollspy.js"></script>
+ <script src="js/bootstrap-tab.js"></script>
+ <script src="js/bootstrap-tooltip.js"></script>
+ <script src="js/bootstrap-popover.js"></script>
+ <script src="js/bootstrap-button.js"></script>
+ <script src="js/bootstrap-collapse.js"></script>
+ <script src="js/bootstrap-carousel.js"></script>
+ <script src="js/bootstrap-typeahead.js"></script>
+
+ </body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.