Skip to content

Commit

Permalink
Adds multiversioning to template editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
wpopielarski committed May 23, 2017
1 parent 5a15b33 commit 7a338b5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions org.scala-ide.play2.templates/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Bundle-ClassPath: .,
Import-Package:
com.ibm.icu.text;apply-aspects:=false;org.eclipse.swt.graphics;apply-aspects:=false,
scala.tools.eclipse.contribution.weaving.jdt.ui.javaeditor.formatter;apply-aspects:=false,
scala.tools.eclipse.contribution.weaving.jdt.ui.document;apply-aspects:=false,
org.eclipse.jface.text,
org.eclipse.jface.text.projection,
scala.xml,
scala.util.parsing.input,
scala.reflect.internal.util
3 changes: 3 additions & 0 deletions org.scala-ide.play2.templates/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
</template-processor>
</extension>

<extension point="org.scala-ide.sdt.aspects.masterprojdocprovider">
<provider class="org.scalaide.play2.templates.MasterProjectionDocumentProvider" />
</extension>
</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.scalaide.play2.templates

import scala.tools.eclipse.contribution.weaving.jdt.ui.document.IMasterProjectionDocumentProvider
import org.eclipse.jface.text.IDocument
import org.scalaide.play2.templateeditor.sse.model.TemplateStructuredDocument

class MasterProjectionDocumentProvider extends IMasterProjectionDocumentProvider {
override def extractActualMaster(master: IDocument) = master match {
case master @ TemplateStructuredDocument(_, _) => master.delegate
case _ => master
}
}

0 comments on commit 7a338b5

Please sign in to comment.