Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving port parameters #135

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Saving port parameters #135

wants to merge 11 commits into from

Conversation

imbur
Copy link
Member

@imbur imbur commented Aug 13, 2018

Fixes #30

@imbur imbur self-assigned this Aug 13, 2018
@imbur imbur requested a review from abelhegedus August 13, 2018 04:25
@@ -1187,12 +1200,12 @@ private void createAndAddPort(Block parent, PortProvider portProvider, Handle po
Port port;
// State is a special outport kind
if ("outport".equalsIgnoreCase(portType) || "state".equalsIgnoreCase(portType)) {
port = portAdapter.createPort(parent, portHandle, outPorts);
port = portAdapter.createPort(this, parent, portHandle, outPorts);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer passing specific information or a wrapper DTO instead of the importer itself.


blockHandleCache.put(modelFQN, (Handle) modelHandle);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really worth it to have a cache instead of passing the handle through the call hierarchy (maybe in the same DTO as suggested below)

@imbur
Copy link
Member Author

imbur commented Aug 15, 2018

Another missing feature: during export, after all blocks are added to the diagram, port parameters should be also set.

@abelhegedus
Copy link
Member

@mayerkr look at exporter and evaluate how much work it would be to set port parameters

@abelhegedus abelhegedus added this to the 0.7.0 milestone Nov 7, 2018
abelhegedus and others added 2 commits December 12, 2018 17:49
# Conflicts:
#	Jenkinsfile
#	plugins/hu.bme.mit.massif.simulink.api/src/hu/bme/mit/massif/simulink/api/Exporter.java
@mayerkr
Copy link
Contributor

mayerkr commented Dec 18, 2018

Created a separate issue regarding the setting of port parameters: #166

@mayerkr
Copy link
Contributor

mayerkr commented Dec 18, 2018

Refactored the importer and adapters to send importer specific data via DTOs. The AbstractImporterDTO and the Importer classes are still incomplete, and need a bit more work.

import hu.bme.mit.massif.simulink.api.util.ISimulinkAPILogger;
import hu.bme.mit.massif.simulink.api.util.ImportMode;

public abstract class AbstractImporterDTO {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use "DTO" in name.
Rename class to AbstractImportData and package to data.

}

}

}
}

private SimulinkModel traverseReferencedLibrary(final Importer traverser, String libraryName,
private SimulinkModel traverseReferencedLibrary(final AbstractImporterDTO importerDTO, String libraryName,
MatlabCommandFactory commandFactory, ImportMode importMode) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImportMode is already part of DTO

@thSoft thSoft modified the milestones: 0.7.0, 0.8.0 Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants