Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 98864 - Need insync support for generic type properties
Need insync support for generic type properties
Status: VERIFIED FIXED
Product: obsolete
Classification: Unclassified
Component: visualweb
6.x
All All
: P2 (vote)
: 6.x
Assigned To: _ deva
issues@obsolete
:
Depends on:
Blocks: 98555
  Show dependency treegraph
 
Reported: 2007-03-23 23:57 UTC by Winston Prakash
Modified: 2007-08-29 18:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Winston Prakash 2007-03-23 23:57:43 UTC
Insync must support generic type properties. This enhancement request has two parts

- Insync must create DesignBean for abstract (interface) type properties in the
design context

For Example
     private List myList;
     public List getMyList(){
        return myList
     }   

insync currently ignore this property and does not create any DesignBean as its
instance will be null.

- If the property is of generic type then insync should be able to give the
parameter type

  private List<String> myList;
  public List<String> getMyList(){
        return myList
  }   

insync should be able to give the parameter type of the property as "String"

The suggested solution

- Create an interface (mixin) called ParameterizedDesignBean

  public interface ParameterizedDesignBean{
     Type[] getTypeParameters();
  }

If the property is parameterized, then check if the DesignBean is of type
ParameterizedDesignBean, and then get the Type[] as
 
   if (designBean instanceof ParameterizedDesignBean){
     Class[] types = ((ParameterizedDesignBean)designBean).getTypeParameters();
   }

The Type must be compiled first and should be available in the classloader. But
now we have a problem, that the project need to be compiled, closed and opened. 

insync should avoid the above step and able to get the Type parametere of the
properties if the project is compiled.
Comment 1 _ deva 2007-05-16 01:09:24 UTC
Initial implementation is checked-in as follows
Checking in faces/HtmlBean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/HtmlBean.
java,v  <--  HtmlBean.java
new revision: 1.2; previous revision: 1.1
done
Checking in faces/FacesPageUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/FacesPage
Unit.java,v  <--  FacesPageUnit.java
new revision: 1.8; previous revision: 1.7
done
Checking in faces/MarkupBean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/MarkupBea
n.java,v  <--  MarkupBean.java
new revision: 1.3; previous revision: 1.2
done
Checking in faces/FacesBean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/FacesBean
.java,v  <--  FacesBean.java
new revision: 1.4; previous revision: 1.3
done
Checking in beans/Bean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/beans/Bean.java
,v  <--  Bean.java
new revision: 1.9; previous revision: 1.8
done
Checking in beans/BeansUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/beans/BeansUnit
.java,v  <--  BeansUnit.java
new revision: 1.9; previous revision: 1.8
done
Checking in live/LiveUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/live/LiveUnit.j
ava,v  <--  LiveUnit.java
new revision: 1.5; previous revision: 1.4
done
RCS 
file: /cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/live/Bean
sDesignBeanExt.java,v
done
Checking in live/BeansDesignBeanExt.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/live/BeansDesig
nBeanExt.java,v  <--  BeansDesignBeanExt.java
initial revision: 1.1
done
Checking in java/JavaClass.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/java/JavaClass.
java,v  <--  JavaClass.java
new revision: 1.9; previous revision: 1.8
done
Comment 2 Lark Fitzgerald 2007-08-29 18:40:14 UTC
Verified using:
Product Version: NetBeans 6 IDE Dev (Build 200708281200) 
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
Glassfish: 58c
Woodstock 4.1: 200708281412


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo