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

EValidator Error #1629

Closed
RyanMcilnay opened this Issue Nov 8, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@RyanMcilnay
Copy link
Contributor

RyanMcilnay commented Nov 8, 2018

Summary

When renaming a process that has a binding in the text editor, a org.osate.aadl2.properties.PropertyDoesNotApplyToHolderException is thrown. This occurs whether you use the Rename Element option from the context menu or select the process and start typing a new name.

Steps to Reproduce

Using the text editor:

  1. Create a system and system implementation
  2. Create processor and process subcomponents
  3. Create a binding:
    Actual_Processor_Binding => (reference (<processor>)) applies to <process>;
  4. Rename the process by right clicking the process and selecting Rename Element, or select the process and begin typing
package EValidator_bug
public
	system sys
	end sys;

	system implementation sys.impl
		subcomponents
			cpu: processor;
			ac: process;
		properties
			Actual_Processor_Binding => (reference (cpu)) applies to ac;
	end sys.impl;
end EValidator_bug;

Environment

  • OSATE Version: 2.3.6
  • Operating System: Windows 10
@RyanMcilnay

This comment has been minimized.

Copy link
Contributor Author

RyanMcilnay commented Nov 8, 2018

@lwrage lwrage added this to the 2.4.1 milestone Mar 5, 2019

@lwrage lwrage added the next label Mar 5, 2019

@joeseibel

This comment has been minimized.

Copy link
Contributor

joeseibel commented Mar 18, 2019

This seems to have been fixed in 666d463.

@joeseibel joeseibel closed this Mar 18, 2019

@wafflebot wafflebot bot removed the next label Mar 18, 2019

@joeseibel

This comment has been minimized.

Copy link
Contributor

joeseibel commented Mar 19, 2019

Reopening this issue because I have been able to reproduce it, but using a different procedure than what is outlined in the first comment. I am able to get a PropertyDoesNotApplyToHolderException when running the validator on the following model:

package property_exception
public
  system s
    properties
      Mode_Transition_Response => Emergency;
  end s;
end property_exception;

This is able to throw the exception because Mode_Transition_Response does not apply to system. Exception:

org.osate.aadl2.properties.PropertyDoesNotApplyToHolderException: Property Mode_Transition_Response does not apply to org.osate.aadl2.impl.SystemTypeImpl
	at org.osate.aadl2.impl.NamedElementImpl.getPropertyValue(NamedElementImpl.java:474)
	at org.osate.xtext.aadl2.properties.validation.PropertiesJavaValidator.checkOverridingConstant(PropertiesJavaValidator.java:680)
	at org.osate.xtext.aadl2.properties.validation.PropertiesJavaValidator.checkConstantProperty(PropertiesJavaValidator.java:662)
	at org.osate.xtext.aadl2.properties.validation.PropertiesJavaValidator.checkPropertyAssociation(PropertiesJavaValidator.java:651)
	at org.osate.xtext.aadl2.properties.validation.PropertiesJavaValidator.casePropertyAssociation(PropertiesJavaValidator.java:157)
	at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.xtext.validation.AbstractDeclarativeValidator$MethodWrapper.invoke(AbstractDeclarativeValidator.java:120)
	at org.eclipse.xtext.validation.AbstractDeclarativeValidator.internalValidate(AbstractDeclarativeValidator.java:314)
	at org.eclipse.xtext.validation.AbstractInjectableValidator.validate(AbstractInjectableValidator.java:71)
	at org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:151)
	at org.eclipse.emf.ecore.util.Diagnostician.doValidate(Diagnostician.java:257)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:244)
	at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:40)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:201)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
	at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:146)
	at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:124)
	at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:90)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:91)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:1)
	at org.eclipse.xtext.util.concurrent.CancelableUnitOfWork.exec(CancelableUnitOfWork.java:26)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:91)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:527)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:499)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:138)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob.createIssues(ValidationJob.java:86)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:67)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

@joeseibel joeseibel reopened this Mar 19, 2019

@wafflebot wafflebot bot added the in progress label Mar 19, 2019

joeseibel added a commit that referenced this issue Mar 19, 2019

@wafflebot wafflebot bot added review and removed in progress labels Mar 19, 2019

@lwrage lwrage closed this in #1752 Mar 20, 2019

@wafflebot wafflebot bot removed the review label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.