-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,801 additions
and
1,182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<FBType Name="E_TRIG" Comment="Trigger unconnected input events of the specified type inside a resource" > | ||
<Identification Standard="61499-2"> | ||
</Identification> | ||
<VersionInfo Version="1.0" Author="Mario Kastner" Date="2025-01-08"> | ||
</VersionInfo> | ||
<CompilerInfo> | ||
</CompilerInfo> | ||
<InterfaceList> | ||
<EventInputs> | ||
<Event Name="REQ" Type="Event" Comment="Request trigger of unconnected event pins of type EVENTTYPE" > | ||
<With Var="EVENTTYPE"/> | ||
</Event> | ||
</EventInputs> | ||
<EventOutputs> | ||
<Event Name="CNF" Type="Event" Comment="Confirmation of Requested Service" > | ||
</Event> | ||
</EventOutputs> | ||
<InputVars> | ||
<VarDeclaration Name="EVENTTYPE" Type="STRING" Comment="Event type to be triggered" InitialValue="'EInit'"/> | ||
</InputVars> | ||
</InterfaceList> | ||
<Service RightInterface="RESOURCE" LeftInterface="APPLICATION"> | ||
</Service> | ||
<Attribute Name="Documentation" Type="CDATA"><![CDATA[]]></Attribute> | ||
</FBType> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...c/org/eclipse/fordiac/ide/globalconstantseditor/formatting2/GlobalConstantsFormatter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Copyright (c) 2022, 2024 Primetals Technologies Austria GmbH | ||
* Martin Erich Jobst | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Hesam Rezaee | ||
* - initial API and implementation and/or initial documentation | ||
* Martin Jobst | ||
* - add global formatting from STFunctionFormatter | ||
* - add formatting for package declaration and imports | ||
*/ | ||
package org.eclipse.fordiac.ide.globalconstantseditor.formatting2; | ||
|
||
import org.eclipse.fordiac.ide.globalconstantseditor.globalConstants.STGlobalConstsSource; | ||
import org.eclipse.fordiac.ide.globalconstantseditor.globalConstants.STVarGlobalDeclarationBlock; | ||
import org.eclipse.fordiac.ide.structuredtextcore.formatting2.STCoreFormatter; | ||
import org.eclipse.xtext.formatting2.IFormattableDocument; | ||
|
||
@SuppressWarnings("java:S100") | ||
public class GlobalConstantsFormatter extends STCoreFormatter { | ||
protected void _format(final STGlobalConstsSource source, final IFormattableDocument document) { | ||
formatSource(source, document); | ||
if (source.getName() != null) { | ||
formatPackage(source, document); | ||
} | ||
formatImports(source.getImports(), document); | ||
formatVarDeclarationBlocks(source.getElements(), document); | ||
} | ||
|
||
protected void _format(final STVarGlobalDeclarationBlock varDeclarationBlock, final IFormattableDocument document) { | ||
formatVarDeclarationBlock(varDeclarationBlock, document, "VAR_GLOBAL"); //$NON-NLS-1$ | ||
} | ||
|
||
@Override | ||
public void format(final Object object, final IFormattableDocument document) { | ||
switch (object) { | ||
case final STGlobalConstsSource element -> _format(element, document); | ||
case final STVarGlobalDeclarationBlock element -> _format(element, document); | ||
case null, default -> super.format(object, document); | ||
} | ||
} | ||
} |
99 changes: 0 additions & 99 deletions
99
.../org/eclipse/fordiac/ide/globalconstantseditor/formatting2/GlobalConstantsFormatter.xtend
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.