Skip to content

Commit

Permalink
Merge branch 'changesForEcosystem'
Browse files Browse the repository at this point in the history
  • Loading branch information
ikuraj committed Aug 17, 2013
2 parents d6e926d + 729eab6 commit 1a5782b
Show file tree
Hide file tree
Showing 17 changed files with 361 additions and 163 deletions.
16 changes: 11 additions & 5 deletions ch.epfl.insynth.build/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ This project contains plugins for building **InSynth** plugin in `Scala IDE`_.
Building
--------

Maven is used to manage the build process. The project can be built for Scala IDE 2.0.2 (stable) and master (nightly/2.1.0).
The build is based on Maven and Tycho. There are several profiles to account for the different version of our dependencies:

*To build for Scala IDE with Scala 2.9 (nightly/2.9), use
* Scala IDE (milestone or nightly)
* Scala (2.9 or 2.10)
* Eclipse (indigo)

$ mvn clean install -P scala-ide-master-scala-2.9
You should check the existing profiles directly in the project's POM. But let's have an example of how you can compose the different profiles.

*To build for Scala IDE with Scala 2.10 (nightly/2.1.0), use
Say you want to build InSynth for the Scala IDE nightly bundled with Scala 2.9, for Eclipse indigo. Here is the Maven command you should enter:

$ mvn clean install -P scala-ide-master-scala-trunk
```mvn -P 2.9.x -P nightly-scala-ide-scala-2.9 -P indigo clean install```

What if instead you wanted to build InSynth against the latest available milestone, instead of against the nightly? That's easy as well:

```mvn -P 2.9.x -P dev-scala-ide-indigo-scala-2.9 -P indigo clean install```

InSynth user documentation
==========================
Expand Down
1 change: 1 addition & 0 deletions ch.epfl.insynth.build/branches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ uiTest - a branch containing working UI tests (stale)
updatedExtractor - working on optimizing (and refactoring extractor)
leon - working on with leon examples (not merged, no need to merge)
issue10 - exercising tracked issue #10 (not merged, no need to merge)
changesForEcosystem - recent changes needed for integration into the ecosystem (ongoing!)

**note git 1.7.9 supports branch descriptions so this should be added accordingly
4 changes: 2 additions & 2 deletions ch.epfl.insynth.build/ch.epfl.insynth.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="ch.epfl.insynth.feature"
label="InSynth Feature"
version="1.0.0"
version="1.0.0.qualifier"
provider-name="scala-ide.org">

<description url="https://github.com/kaptoxic/scala-ide-insynth-integration/wiki">
Expand Down Expand Up @@ -69,7 +69,7 @@ SUCH DAMAGE.
id="ch.epfl.insynth"
download-size="0"
install-size="0"
version="1.0.0"
version="1.0.0.qualifier"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion ch.epfl.insynth.build/ch.epfl.insynth.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ch.epfl</groupId>
<artifactId>ch.epfl.insynth.build</artifactId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>ch.epfl.insynth.feature</artifactId>
<packaging>eclipse-feature</packaging>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="ch.epfl.insynth.source.feature"
label="InSynth Source Feature"
version="1.0.0"
version="1.0.0.qualifier"
provider-name="scala-ide.org">

<description url="https://github.com/kaptoxic/scala-ide-insynth-integration/wiki">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ch.epfl</groupId>
<artifactId>ch.epfl.insynth.build</artifactId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>ch.epfl.insynth.source.feature</artifactId>
<packaging>eclipse-feature</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: InSynth Plugin (Test)
Bundle-SymbolicName: ch.epfl.insynth.tests
Bundle-Version: 1.0.0
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: ch.epfl
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
Expand Down
2 changes: 1 addition & 1 deletion ch.epfl.insynth.build/ch.epfl.insynth.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>ch.epfl</groupId>
<artifactId>ch.epfl.insynth.build</artifactId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>ch.epfl.insynth.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
Expand Down
4 changes: 2 additions & 2 deletions ch.epfl.insynth.build/ch.epfl.insynth.update-site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<parent>
<groupId>ch.epfl</groupId>
<artifactId>ch.epfl.insynth.build</artifactId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>ch.epfl.insynth.update-site</artifactId>
<packaging>eclipse-update-site</packaging>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
</project>
4 changes: 2 additions & 2 deletions ch.epfl.insynth.build/ch.epfl.insynth.update-site/site.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/ch.epfl.insynth.feature_1.0.0.jar" id="ch.epfl.insynth.feature" version="1.0.0">
<feature url="features/ch.epfl.insynth.feature_1.0.0.qualifier.jar" id="ch.epfl.insynth.feature" version="1.0.0.qualifier">
<category name="ch.epfl"/>
</feature>
<feature url="features/ch.epfl.insynth.source.feature_1.0.0.jar" id="ch.epfl.insynth.source.feature" version="1.0.0">
<feature url="features/ch.epfl.insynth.source.feature_1.0.0.qualifier.jar" id="ch.epfl.insynth.source.feature" version="1.0.0.qualifier">
<category name="ch.epfl"/>
</feature>
<category-def name="ch.epfl" label="InSynth plugin"/>
Expand Down
2 changes: 1 addition & 1 deletion ch.epfl.insynth.build/ch.epfl.insynth/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Insynth Core
Bundle-SymbolicName: ch.epfl.insynth;singleton:=true
Bundle-Version: 1.0.0
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: ch.epfl.insynth.core.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Expand Down
2 changes: 1 addition & 1 deletion ch.epfl.insynth.build/ch.epfl.insynth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ch.epfl</groupId>
<artifactId>ch.epfl.insynth.build</artifactId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>ch.epfl.insynth</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal
import org.eclipse.jface.text.contentassist.{ ICompletionProposalExtension, ICompletionProposalExtension6, IContextInformation }
import org.eclipse.swt.graphics.Image
import org.eclipse.jface.text.IDocument
import org.eclipse.jface.viewers.{ISelectionProvider, StyledString}
import org.eclipse.jface.viewers.{ ISelectionProvider, StyledString }
import org.eclipse.jface.text.TextSelection
import org.eclipse.jface.text.ITextViewer
import org.eclipse.jdt.internal.ui.JavaPluginImages
Expand All @@ -18,49 +18,51 @@ import org.eclipse.jface.text.link.LinkedModeUI.ExitFlags
import org.eclipse.swt.SWT
import org.eclipse.jface.text.contentassist.ICompletionProposal

class InSynthCompletitionProposal (completition:String, relevance:Int)
extends IJavaCompletionProposal with ICompletionProposalExtension with ICompletionProposalExtension6
{
class InSynthCompletitionProposal(completition: String, relevance: Int)
extends IJavaCompletionProposal with ICompletionProposalExtension with ICompletionProposalExtension6 {

def getRelevance = {
1000 + relevance
}

def getImage = {
null
null
}
def getContextInformation(): IContextInformation ={

def getContextInformation(): IContextInformation = {
null
}

def getDisplayString() = {
completition
}
def getStyledDisplayString() = {

def getStyledDisplayString() = {
new StyledString(completition)
}

def getAdditionalProposalInfo() = {
null
}

def getSelection(d: IDocument) = {
null
}
def apply(d: IDocument) {
null

def apply(d: IDocument) {
}

def apply(d: IDocument, trigger: Char, offset: Int){
def apply(d: IDocument, trigger: Char, offset: Int) {
d.replace(offset, 0, completition)
}

def getTriggerCharacters = {
null
}
def getContextInformationPosition = {
1
}

def isValidFor(d: IDocument, pos: Int) = {
true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package ch.epfl.insynth.reconstruction.combinator

import scala.math.min

import ch.epfl.insynth.{ env => InSynth }
import ch.epfl.insynth.trees.{ Type, BottomType }
import java.util.logging.Logger
import ch.epfl.insynth.trees.FormatType
import ch.epfl.insynth.reconstruction.intermediate.NullLeaf
import ch.epfl.insynth.env.FormatNode
import java.util.logging.Level
import java.util.logging.ConsoleHandler
import java.util.logging.FileHandler
import java.util.logging.SimpleFormatter
import ch.epfl.insynth.reconstruction.Config
import ch.epfl.insynth.env.FormatNode

import java.util.logging.{ Logger, Level, ConsoleHandler, FileHandler, SimpleFormatter }

// TODO set required combinations in each Tree node after we hit the limit in the top
// tree
// TODO shared and private parameters of abstractions (not to explore two trees that
Expand Down Expand Up @@ -117,7 +116,7 @@ extends Combinations
Config.logStructures.info("Tree(" + this + ") received decl with weight " +
decl.getMinComputedWeight + "and has minWeight " + minWeight)
}
minWeight = Math.min(getTraversalWeight + decl.getMinComputedWeight, minWeight)
minWeight = min(getTraversalWeight + decl.getMinComputedWeight, minWeight)
parent.childDone(this)
}

Expand Down
65 changes: 65 additions & 0 deletions ch.epfl.insynth.build/ecosystem-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash -e

# url names for each flavor defined below
URL_NAMES=(
"dev-indigo-2_9"
"dev-indigo-2_10"
"dev-juno-2_9"
"dev-juno-2_10"
"stable-indigo-2_9"
"stable-indigo-2_10"
"stable-juno-2_9"
"stable-juno-2_10"
)

# combinations of flavors to build
FLAVORS=(
"-Pindigo -Pdev-scala-ide-indigo-scala-2.9 -P2.9.x"
"-Pindigo -Pdev-scala-ide-indigo-scala-2.10 -P2.10.x"
"-Pjuno -Pdev-scala-ide-juno-scala-2.9 -P2.9.x"
"-Pjuno -Pdev-scala-ide-juno-scala-2.10 -P2.10.x"
"-Pindigo -Pstable-scala-ide-indigo-scala-2.9 -P2.9.x"
"-Pindigo -Pstable-scala-ide-indigo-scala-2.10 -P2.10.x"
"-Pjuno -Pstable-scala-ide-juno-scala-2.9 -P2.9.x"
"-Pjuno -Pstable-scala-ide-juno-scala-2.10 -P2.10.x"
)

# root dir (containing this script)
#ROOT_DIR=$(dirname $0)
ROOT_DIR=${PWD}
TARGET_DIR=/localhome/kuraj/temp/insynth-maven-build

mkdir -p ${TARGET_DIR}

for ((i=0; i < ${#FLAVORS[@]}; i++))
do

FLAVOR=${FLAVORS[$i]}

COMB=${URL_NAMES[$i]}
echo "Building InSynth with $FLAVOR into ${TARGET_DIR}/${COMB}"

mvn -Pset-versions $FLAVOR -Dtycho.style=maven --non-recursive exec:java

mvn -Pset-versions $FLAVOR -Dversion.tag=v clean package

RETVAL=$?
[ $RETVAL -ne 0 ] && echo "Maven build for $FLAVOR failed! Press enter to continue..." && read line

rm -rf ${TARGET_DIR}/$COMB

cp -r ${ROOT_DIR}/ch.epfl.insynth.update-site/target/site/ ${TARGET_DIR}/$COMB

# if needed publishing to LARA update site
if [ $# -lt 1 ];
then
echo "Not copying files to insynth@laraserver.epfl.ch"
else
echo "Copying files to insynth@laraserver.epfl.ch"
ssh insynth@laraserver.epfl.ch "rm -rf ~/public_html/$COMB"
scp -r ${TARGET_DIR}/$COMB insynth@laraserver.epfl.ch:~/public_html/
fi

done

exit
Loading

0 comments on commit 1a5782b

Please sign in to comment.