Skip to content

Commit

Permalink
eclipse-archived#190 In progress TqCL - syntax (connect) and library …
Browse files Browse the repository at this point in the history
…services
  • Loading branch information
rtotaro committed Jan 15, 2017
1 parent 14eb95e commit bbd39c7
Show file tree
Hide file tree
Showing 21 changed files with 500 additions and 344 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ public interface TqCLLibraryProvider {

public List<ActorDescriptor> getActors(String library) throws TqCLLibraryException;

public EntityDescriptor getActor(String library,String actorClass) throws TqCLLibraryException;
public ActorDescriptor getActor(String library,String actorClass) throws TqCLLibraryException;

public EntityDescriptor getActor(String actorClass) throws TqCLLibraryException;
public ActorDescriptor getActor(String actorClass) throws TqCLLibraryException;

public List<DirectorDescriptor> getDirectors(String library) throws TqCLLibraryException;

public DirectorDescriptor getDirector(String directorClass) throws TqCLLibraryException;

public List<ParameterDescriptor> getParameterTypes(String library) throws TqCLLibraryException;

public List<String> getPortTypes(String library) throws TqCLLibraryException;
public ParameterDescriptor getParameterType(String parameterClass);

public List<PortDescriptor> getPortTypes(String library) throws TqCLLibraryException;

public PortDescriptor getPortType(String portClass) throws TqCLLibraryException;

public List<PortDescriptor> getActorPorts(String actor) throws TqCLLibraryException;

Expand All @@ -37,8 +43,6 @@ public interface TqCLLibraryProvider {

public boolean hasElementInLibrary(String element, String library, String category);

public EntityDescriptor getDirector(String directorClass) throws TqCLLibraryException;

public EntityDescriptor getParameter(String parameterClass);

}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public List<ParameterDescriptor> getParameterTypes(String library) throws TqCLLi
}

@Override
public List<String> getPortTypes(String library) throws TqCLLibraryException {
public List<PortDescriptor> getPortTypes(String library) throws TqCLLibraryException {
checkLibrary(library);
return libraryProviders.get(library).getPortTypes(library);
}
Expand Down Expand Up @@ -109,14 +109,14 @@ public void addLibraryProvider(TqCLLibraryProvider tqCLLibraryProvider) {
}

@Override
public EntityDescriptor getActor(String library, String actorClass) throws TqCLLibraryException {
public ActorDescriptor getActor(String library, String actorClass) throws TqCLLibraryException {
return this.libraryProviders.get(library).getActor(library, actorClass);
}

@Override
public EntityDescriptor getActor(String actorClass) throws TqCLLibraryException {
public ActorDescriptor getActor(String actorClass) throws TqCLLibraryException {
for (TqCLLibraryProvider provider : libraryProviders.values()) {
EntityDescriptor actor = provider.getActor(actorClass);
ActorDescriptor actor = provider.getActor(actorClass);
if(actor!=null)
{
return actor;
Expand All @@ -126,9 +126,9 @@ public EntityDescriptor getActor(String actorClass) throws TqCLLibraryException
}

@Override
public EntityDescriptor getDirector(String directorClass) throws TqCLLibraryException {
public DirectorDescriptor getDirector(String directorClass) throws TqCLLibraryException {
for (TqCLLibraryProvider provider : libraryProviders.values()) {
EntityDescriptor director = provider.getDirector(directorClass);
DirectorDescriptor director = provider.getDirector(directorClass);
if(director!=null)
{
return director;
Expand All @@ -137,9 +137,9 @@ public EntityDescriptor getDirector(String directorClass) throws TqCLLibraryExce
return null;
}
@Override
public EntityDescriptor getParameter(String parameterClass) {
public ParameterDescriptor getParameterType(String parameterClass) {
for (TqCLLibraryProvider provider : libraryProviders.values()) {
EntityDescriptor parameter = provider.getParameter(parameterClass);
ParameterDescriptor parameter = provider.getParameterType(parameterClass);
if(parameter!=null)
{
return parameter;
Expand All @@ -158,5 +158,17 @@ public boolean hasElementInLibrary(String element, String library,String categor
return false;
}

@Override
public PortDescriptor getPortType(String portClass) throws TqCLLibraryException {
for (TqCLLibraryProvider provider : libraryProviders.values()) {
PortDescriptor port = provider.getPortType(portClass);
if(port!=null)
{
return port;
}
}
return null;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ rule__CompositeCommand__Group__1__Impl
:
(
{ before(grammarAccess.getCompositeCommandAccess().getCommandsAssignment_1()); }
(rule__CompositeCommand__CommandsAssignment_1)
(rule__CompositeCommand__CommandsAssignment_1)*
{ after(grammarAccess.getCompositeCommandAccess().getCommandsAssignment_1()); }
)
;
Expand Down
Loading

0 comments on commit bbd39c7

Please sign in to comment.