[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ve-dev] Read/Write of complex LayoutManager values
|
Rich and Joe -- as always, thanks for the help.
Next problem -- that is, first next problem -- is that I cannot seem to
get my "adapter" class (RemoteVMAdapter) to be recognized on
the remote VM. My
"getBeanTypeProxy(targetVMHelperTypeName)" call is, however,
always failing -- returning null. I have verified that VE is
talking to the remote VM, sending a request and receiving a
response. Unfortunately, the response is signalling
Command.Get_Class_Not_Found. Result is the same whether I run the
plugin as an exported project or as an Eclipse application.
The full routine (located within my
FormLayoutPolicyHelper)
is:
private
boolean getFormLayoutHelperProxy() {
String
targetVMHelperTypeName =
"net.certiv.ve.jfc.targetvm.formlayout.RemoteVMAdapter";
//$NON-NLS-1$
if
(isContainerBeanInvalid()) return false;
formLayoutHelperType
= getContainerBeanProxy().getProxyFactoryRegistry().
getBeanTypeProxyFactory().getBeanTypeProxy(targetVMHelperTypeName);
//
^^^^ always returns null
try
{
formLayoutHelperProxy
= (IBeanTypeProxy) formLayoutHelperType.newInstance();
IMethodProxy
setContainerMethodProxy = formLayoutHelperProxy.getMethodProxy(
"setContainer",
"java.awt.Container;"); //$NON-NLS-1$ //$NON-NLS-2$
setContainerMethodProxy.invoke(formLayoutHelperProxy,
getContainerBeanProxy());
}
catch (Exception e) {
e.printStackTrace();
return
false;
}
return
true;
}
My "proxy.jars" is set as:
vmAdapter.jar=/net.certiv.ve/vm_bin/
where "vmAdapter.jar" contains the adapter class,
"net.certiv.ve" is the plugin ID, and vm_bin is the output
directory specified in build.properties:
output.vmAdapter.jar
= vm_bin/
The vm_bin directory does contain the adapter class file at the
right path.
I have also tried adding a registration to the plugin.xml, but with no
success:
<extension
point="org.eclipse.ve.java.core.registrations">
<registration
container="net.certiv.ve.jfc.targetvm.formlayout.RemoteVMAdapter"
description="RemoteVMAdapter">
<library
runtime="vmAdapter.jar"/>
</registration>
</extension>
Not sure that I got the right extension point and container.
Anything more or different I am supposed to do to get the adapter
recognized on the remote VM? Any suggestions on how to further
debug this problem?
In the hope that you might have a moment to take a closer look, I have
attached the plugin.xml, MANIFEST.MF, etc project definition files.
--------------------------------------------
Second problem is that I need to be able to use my
"FormLayoutPolicyHelper" from the layout customizer invoked
from the menu choice that runs FormLayoutLayoutPage. Since
FormLayoutLayoutPage is run as a ".class" file from the menu
selection, it does not get set with the VisualContainerPolicy.
FormLayoutPolicyHelper, however, ultimately needs the policy.
I am using the current selection's EditPart, as provided through the
"handleSelectionChanged" method of FormLayoutLayoutPage to get
the policy:
protected
VisualContainerPolicy getPolicy(EditPart editPart) {
ContainerGraphicalEditPart gPart = (ContainerGraphicalEditPart) editPart;
FormLayoutEditPolicy fep = (FormLayoutEditPolicy) gPart
.getEditPolicy(EditPolicy.LAYOUT_ROLE);
VisualContainerPolicy policy = fep.getContainerPolicy();
return policy;
Seems to work, but this is the policy relied upon by the "getContainerBeanProxy()" method, which is used in the first question above (and therefore makes it suspect). Can you verify that this use/approach is proper? If not, how do I get the correct policy to set to the FormLayoutPolicyHelper for use in the layout customizer?
Thanks,
Gerald
Attachment:
MANIFEST.MF
Description: Binary data
output.. = bin/
bin.includes = META-INF/,\
plugin.xml,\
overrides/,\
toc.xml,\
testToc.xml,\
html/,\
forms-1.0.7custom.jar,\
certiv-uiprefeditors-0.10.jar,\
certiv-swing-0.60.jar,\
log4j-1.2.13.jar,\
looks-2.0.2.jar,\
.,\
vmAdapter.jar
jars.compile.order = forms-1.0.7custom.jar,\
vmAdapter.jar,\
.
output.vmAdapter.jar = vm_bin/
source.forms-1.0.7custom.jar = core_formlayout/
output.forms-1.0.7custom.jar = core_bin/
jars.extra.classpath = certiv-swing-0.60.jar,\
certiv-uiprefeditors-0.10.jar,\
log4j-1.2.13.jar,\
looks-2.0.2.jar
source.. = src/,\
vm_jfcbeaninfo/,\
jfc/
source.vmAdapter.jar = vmAdapter/
Attachment:
plugin.xml
Description: Binary data
vmAdapter.jar=/net.certiv.ve/vm_bin/