Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CUP Eclipse Plugin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr. Michael Petter
CUP Eclipse Plugin
Commits
eb22c744
Commit
eb22c744
authored
Nov 28, 2014
by
Johannes Roith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename interfaces.
parent
f003f673
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
33 additions
and
37 deletions
+33
-37
CupPlugin/src/de/tum/in/www2/cupplugin/controller/Controller.java
...n/src/de/tum/in/www2/cupplugin/controller/Controller.java
+5
-5
CupPlugin/src/de/tum/in/www2/cupplugin/controller/IRegisterForControllerChanges.java
...2/cupplugin/controller/IRegisterForControllerChanges.java
+1
-1
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupConflictGraphView.java
...e/tum/in/www2/cupplugin/editors/CupConflictGraphView.java
+4
-4
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupContentAssistProcessor.java
.../in/www2/cupplugin/editors/CupContentAssistProcessor.java
+1
-1
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupContentOutlinePage.java
.../tum/in/www2/cupplugin/editors/CupContentOutlinePage.java
+2
-2
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupReduceGraphView.java
.../de/tum/in/www2/cupplugin/editors/CupReduceGraphView.java
+4
-4
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupSourceViewerConfiguration.java
.../www2/cupplugin/editors/CupSourceViewerConfiguration.java
+4
-4
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupTextEditor.java
...n/src/de/tum/in/www2/cupplugin/editors/CupTextEditor.java
+1
-5
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupTextHover.java
...in/src/de/tum/in/www2/cupplugin/editors/CupTextHover.java
+4
-4
CupPlugin/src/de/tum/in/www2/cupplugin/model/ICupGraphModelObserver.java
...e/tum/in/www2/cupplugin/model/ICupGraphModelObserver.java
+1
-1
CupPlugin/src/de/tum/in/www2/cupplugin/model/ICupParserASTChangeObserver.java
.../in/www2/cupplugin/model/ICupParserASTChangeObserver.java
+1
-1
CupPlugin/src/de/tum/in/www2/cupplugin/model/ICupParserLaLrChangeObserver.java
...in/www2/cupplugin/model/ICupParserLaLrChangeObserver.java
+1
-1
CupPlugin/src/de/tum/in/www2/cupplugin/model/Model.java
CupPlugin/src/de/tum/in/www2/cupplugin/model/Model.java
+4
-4
No files found.
CupPlugin/src/de/tum/in/www2/cupplugin/controller/Controller.java
View file @
eb22c744
...
...
@@ -51,7 +51,7 @@ public class Controller {
private
long
currentRevisionNumber
=
0
;
private
List
<
RegisterForControllerChanges
>
controllerObservers
;
private
List
<
I
RegisterForControllerChanges
>
controllerObservers
;
/*
* Static singleton getter
...
...
@@ -93,7 +93,7 @@ public class Controller {
myJob
.
setSystem
(
true
);
documentEvents
=
new
LinkedList
<
DocumentEvent
>();
Debugger
.
getInstance
(
editor
);
controllerObservers
=
new
LinkedList
<
RegisterForControllerChanges
>();
controllerObservers
=
new
LinkedList
<
I
RegisterForControllerChanges
>();
}
public
void
addDocumentEvent
(
DocumentEvent
e
)
{
...
...
@@ -137,7 +137,7 @@ public class Controller {
myJob
.
schedule
(
0
);
}
public
void
registerObserver
(
RegisterForControllerChanges
observer
)
{
public
void
registerObserver
(
I
RegisterForControllerChanges
observer
)
{
synchronized
(
controllerObservers
)
{
controllerObservers
.
add
(
observer
);
}
...
...
@@ -158,7 +158,7 @@ public class Controller {
EnumSet
<
JobsToDo
>
observedJobs
=
EnumSet
.
noneOf
(
JobsToDo
.
class
);
synchronized
(
controllerObservers
)
{
for
(
RegisterForControllerChanges
observer
:
controllerObservers
)
{
for
(
I
RegisterForControllerChanges
observer
:
controllerObservers
)
{
observedJobs
.
addAll
(
observer
.
getRequiredJobs
());
}
}
...
...
@@ -279,7 +279,7 @@ public class Controller {
EnumSet
<
JobsToDo
>
observedJobs
=
EnumSet
.
noneOf
(
JobsToDo
.
class
);
synchronized
(
controllerObservers
)
{
for
(
RegisterForControllerChanges
observer
:
controllerObservers
)
{
for
(
I
RegisterForControllerChanges
observer
:
controllerObservers
)
{
observedJobs
.
addAll
(
observer
.
getRequiredJobs
());
}
}
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/controller/RegisterForControllerChanges.java
→
CupPlugin/src/de/tum/in/www2/cupplugin/controller/
I
RegisterForControllerChanges.java
View file @
eb22c744
...
...
@@ -4,7 +4,7 @@ import java.util.EnumSet;
import
de.tum.in.www2.cupplugin.controller.Controller.JobsToDo
;
public
interface
RegisterForControllerChanges
{
public
interface
I
RegisterForControllerChanges
{
EnumSet
<
JobsToDo
>
getRequiredJobs
();
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupConflictGraphView.java
View file @
eb22c744
...
...
@@ -55,19 +55,19 @@ import de.in.tum.www2.cup.internal.lalr_state;
import
de.in.tum.www2.cup.internal.lalr_transition
;
import
de.tum.in.www2.cupplugin.controller.Controller
;
import
de.tum.in.www2.cupplugin.controller.Controller.JobsToDo
;
import
de.tum.in.www2.cupplugin.controller.RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.controller.
I
RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.editors.CupReduceGraphView.GraphNodeContentProvider
;
import
de.tum.in.www2.cupplugin.editors.CupReduceGraphView.ModelRebuildJob
;
import
de.tum.in.www2.cupplugin.editors.CupReduceGraphView.ParserNodeModelContentProvider
;
import
de.tum.in.www2.cupplugin.editors.CupReduceGraphView.ParserReduceConnection
;
import
de.tum.in.www2.cupplugin.editors.CupReduceGraphView.ParserReduceLabelProvider
;
import
de.tum.in.www2.cupplugin.editors.CupReduceGraphView.ParserReduceNode
;
import
de.tum.in.www2.cupplugin.model.CupParserLaLrChangeObserver
;
import
de.tum.in.www2.cupplugin.model.
I
CupParserLaLrChangeObserver
;
import
de.tum.in.www2.cupplugin.model.Model
;
public
class
CupConflictGraphView
implements
CupParserLaLrChangeObserver
,
public
class
CupConflictGraphView
implements
I
CupParserLaLrChangeObserver
,
IZoomableWorkbenchPart
,
CupEditorPageVisibility
,
RegisterForControllerChanges
{
I
RegisterForControllerChanges
{
private
static
final
int
BUTTON_WIDTH
=
120
;
private
static
final
int
LABEL_WIDTH
=
40
;
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupContentAssistProcessor.java
View file @
eb22c744
...
...
@@ -16,7 +16,7 @@ import de.in.tum.www2.cup.analysis.DeclarationsExtractorVisitor;
import
de.in.tum.www2.cup.ast.ParserResult
;
import
de.tum.in.www2.cupplugin.model.*
;
public
class
CupContentAssistProcessor
implements
IContentAssistProcessor
,
CupParserASTChangeObserver
{
public
class
CupContentAssistProcessor
implements
IContentAssistProcessor
,
I
CupParserASTChangeObserver
{
private
Declarations
decls
;
private
IDocument
doc
;
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupContentOutlinePage.java
View file @
eb22c744
...
...
@@ -36,12 +36,12 @@ import de.in.tum.www2.cup.ast.*;
import
de.in.tum.www2.cup.ast.Package
;
import
de.tum.in.www2.cupplugin.controller.Controller.JobsToDo
;
import
de.tum.in.www2.cupplugin.controller.Controller
;
import
de.tum.in.www2.cupplugin.controller.RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.controller.
I
RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.model.*
;
// TODO: try changing to IContentOutlinePage and using a virtual view!
public
class
CupContentOutlinePage
extends
ContentOutlinePage
implements
CupParserASTChangeObserver
,
RegisterForControllerChanges
{
ICupParserASTChangeObserver
,
I
RegisterForControllerChanges
{
private
static
final
int
AUTO_EXPAND_L3_MAX_ITEMS
=
100
;
private
static
final
int
AUTO_EXPAND_L2_MAX_ITEMS
=
500
;
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupReduceGraphView.java
View file @
eb22c744
...
...
@@ -76,13 +76,13 @@ import de.in.tum.www2.cup.internal.parse_reduce_row;
import
de.in.tum.www2.cup.internal.parse_reduce_table
;
import
de.tum.in.www2.cupplugin.controller.Controller.JobsToDo
;
import
de.tum.in.www2.cupplugin.controller.Controller
;
import
de.tum.in.www2.cupplugin.controller.RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.model.CupParserLaLrChangeObserver
;
import
de.tum.in.www2.cupplugin.controller.
I
RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.model.
I
CupParserLaLrChangeObserver
;
import
de.tum.in.www2.cupplugin.model.Model
;
public
class
CupReduceGraphView
implements
CupParserLaLrChangeObserver
,
public
class
CupReduceGraphView
implements
I
CupParserLaLrChangeObserver
,
IZoomableWorkbenchPart
,
CupEditorPageVisibility
,
RegisterForControllerChanges
{
I
RegisterForControllerChanges
{
// Some Constants
private
static
final
int
BUTTON_WIDTH
=
120
;
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupSourceViewerConfiguration.java
View file @
eb22c744
...
...
@@ -44,8 +44,8 @@ import de.in.tum.www2.java.JavaScanner;
import
de.in.tum.www2.java.JavaSymbol
;
import
de.tum.in.www2.cupplugin.PluginUtility
;
import
de.tum.in.www2.cupplugin.controller.Controller.JobsToDo
;
import
de.tum.in.www2.cupplugin.controller.RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.model.CupParserASTChangeObserver
;
import
de.tum.in.www2.cupplugin.controller.
I
RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.model.
I
CupParserASTChangeObserver
;
import
de.tum.in.www2.cupplugin.model.Model
;
public
class
CupSourceViewerConfiguration
extends
SourceViewerConfiguration
{
...
...
@@ -95,7 +95,7 @@ public class CupSourceViewerConfiguration extends SourceViewerConfiguration {
}
public
class
PresentationModelObserver
implements
CupParserASTChangeObserver
,
RegisterForControllerChanges
{
ICupParserASTChangeObserver
,
I
RegisterForControllerChanges
{
private
CupTokenScanner
cupTokenScanner
;
private
JavaTokenScanner
javaTokenScanner
;
private
ISourceViewer
sourceViewer
;
...
...
@@ -121,7 +121,7 @@ public class CupSourceViewerConfiguration extends SourceViewerConfiguration {
public
EnumSet
<
JobsToDo
>
getRequiredJobs
()
{
return
EnumSet
.
of
(
JobsToDo
.
parseCode
);
}
@Override
public
void
modelChanged
(
Model
model
)
{
ParserResult
result
=
model
.
getAstModel
();
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupTextEditor.java
View file @
eb22c744
package
de.tum.in.www2.cupplugin.editors
;
import
org.eclipse.core.resources.IResourceChangeEvent
;
import
org.eclipse.core.runtime.IProgressMonitor
;
import
org.eclipse.debug.ui.actions.ToggleBreakpointAction
;
import
org.eclipse.jface.action.IAction
;
...
...
@@ -22,7 +21,6 @@ import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import
org.eclipse.ui.views.contentoutline.IContentOutlinePage
;
import
de.in.tum.www2.cup.Position
;
import
de.in.tum.www2.cup.ast.ParserResult
;
import
de.tum.in.www2.cupplugin.PluginUtility
;
import
de.tum.in.www2.cupplugin.controller.Controller
;
import
de.tum.in.www2.cupplugin.model.Model
;
...
...
@@ -76,10 +74,7 @@ public class CupTextEditor extends TextEditor {
public
CupTextEditor
()
{
super
();
setSourceViewerConfiguration
(
new
CupSourceViewerConfiguration
(
this
));
//create controller for this editor
Controller
.
getInstance
(
this
);
// ComplexSymbolFactory f = new ComplexSymbolFactory();
// java_cup.Lexer = new java_cup.Lexer(arg0, f);
}
public
Model
getModel
()
{
...
...
@@ -125,6 +120,7 @@ public class CupTextEditor extends TextEditor {
}
// TODO: maybe synchronize the debug breakpoints here.
PluginUtility
.
fullSyntaxRefresh
(
getSourceViewer
());
}
@Override
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupTextHover.java
View file @
eb22c744
...
...
@@ -12,13 +12,13 @@ import de.in.tum.www2.cup.analysis.FindAtPositionVisitor;
import
de.in.tum.www2.cup.ast.AbstractNode
;
import
de.in.tum.www2.cup.ast.ParserResult
;
import
de.tum.in.www2.cupplugin.controller.Controller.JobsToDo
;
import
de.tum.in.www2.cupplugin.controller.RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.model.CupParserASTChangeObserver
;
import
de.tum.in.www2.cupplugin.controller.
I
RegisterForControllerChanges
;
import
de.tum.in.www2.cupplugin.model.
I
CupParserASTChangeObserver
;
import
de.tum.in.www2.cupplugin.model.Model
;
public
class
CupTextHover
implements
ITextHover
,
CupParserASTChangeObserver
,
RegisterForControllerChanges
{
I
CupParserASTChangeObserver
,
I
RegisterForControllerChanges
{
private
AbstractNode
prevRequestedNode
;
private
ParserResult
ast
;
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/model/CupGraphModelObserver.java
→
CupPlugin/src/de/tum/in/www2/cupplugin/model/
I
CupGraphModelObserver.java
View file @
eb22c744
package
de.tum.in.www2.cupplugin.model
;
public
interface
CupGraphModelObserver
{
public
interface
I
CupGraphModelObserver
{
public
void
modelChanged
(
Model
model
);
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/model/CupParserASTChangeObserver.java
→
CupPlugin/src/de/tum/in/www2/cupplugin/model/
I
CupParserASTChangeObserver.java
View file @
eb22c744
package
de.tum.in.www2.cupplugin.model
;
public
interface
CupParserASTChangeObserver
{
public
interface
I
CupParserASTChangeObserver
{
public
void
modelChanged
(
Model
model
);
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/model/CupParserLaLrChangeObserver.java
→
CupPlugin/src/de/tum/in/www2/cupplugin/model/
I
CupParserLaLrChangeObserver.java
View file @
eb22c744
package
de.tum.in.www2.cupplugin.model
;
public
interface
CupParserLaLrChangeObserver
{
public
interface
I
CupParserLaLrChangeObserver
{
public
void
ModelChange
(
Model
model
);
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/model/Model.java
View file @
eb22c744
...
...
@@ -99,8 +99,8 @@ public class Model {
this
.
astModel
=
result
;
this
.
astModelRevisionNumber
=
revisionNumber
;
for
(
Object
observer
:
modelObservers
)
{
if
(
observer
instanceof
CupParserASTChangeObserver
)
{
((
CupParserASTChangeObserver
)
observer
).
modelChanged
(
this
);
if
(
observer
instanceof
I
CupParserASTChangeObserver
)
{
((
I
CupParserASTChangeObserver
)
observer
).
modelChanged
(
this
);
}
}
}
...
...
@@ -128,8 +128,8 @@ public class Model {
this
.
lalrModelRevisionNumber
=
revisionNumber
;
this
.
lalrContext
=
lalrContext
;
for
(
Object
observer
:
modelObservers
)
{
if
(
observer
instanceof
CupParserLaLrChangeObserver
)
{
((
CupParserLaLrChangeObserver
)
observer
).
ModelChange
(
this
);
if
(
observer
instanceof
I
CupParserLaLrChangeObserver
)
{
((
I
CupParserLaLrChangeObserver
)
observer
).
ModelChange
(
this
);
}
}
//System.out.println(lalrModel.getReduceTable().toString());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment