This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 112520
Collapse All | Expand All

(-)uml/core/src/org/netbeans/modules/uml/core/coreapplication/CoreProductManager.java (-8 / +8 lines)
Lines 35-41 Link Here
35
	/// process ID, product
35
	/// process ID, product
36
	//typedef std::map < long, CComPtr < ICoreProduct > > ProductMap;
36
	//typedef std::map < long, CComPtr < ICoreProduct > > ProductMap;
37
	// Here's a map of the products and their process id's
37
	// Here's a map of the products and their process id's
38
	private Hashtable < String, ICoreProduct > m_CoreProducts = new Hashtable < String, ICoreProduct >();
38
	private Hashtable < Integer, ICoreProduct > m_CoreProducts = new Hashtable < Integer, ICoreProduct >();
39
39
40
	// Here's the revoke number
40
	// Here's the revoke number
41
	private long m_RevokeNum = 0;
41
	private long m_RevokeNum = 0;
Lines 141-147 Link Here
141
	 */
141
	 */
142
	public ICoreProduct getCoreProduct(int nPID) 
142
	public ICoreProduct getCoreProduct(int nPID) 
143
	{
143
	{
144
		ICoreProduct retVal = m_CoreProducts.get(Integer.toString(nPID));
144
		ICoreProduct retVal = m_CoreProducts.get(nPID);
145
		if (retVal == null)
145
		if (retVal == null)
146
		{
146
		{
147
			if (!m_CoreProducts.isEmpty())
147
			if (!m_CoreProducts.isEmpty())
Lines 173-179 Link Here
173
	 */
173
	 */
174
	public void setCoreProduct(int nPID, ICoreProduct value) 
174
	public void setCoreProduct(int nPID, ICoreProduct value) 
175
	{
175
	{
176
		ICoreProduct prod = m_CoreProducts.get(Integer.toString(nPID));
176
		ICoreProduct prod = m_CoreProducts.get(nPID);
177
		if (prod != null)
177
		if (prod != null)
178
		{
178
		{
179
			// If there is already a product registered for this
179
			// If there is already a product registered for this
Lines 184-194 Link Here
184
		
184
		
185
		if (value == null)
185
		if (value == null)
186
		{
186
		{
187
			m_CoreProducts.remove(Integer.toString(nPID));
187
			m_CoreProducts.remove(nPID);
188
		}
188
		}
189
		else
189
		else
190
		{
190
		{
191
			m_CoreProducts.put(Integer.toString(nPID), value);
191
			m_CoreProducts.put(nPID, value);
192
		}
192
		}
193
	}
193
	}
194
194
Lines 207-224 Link Here
207
		ETList<IProductDescriptor> descList = new ETArrayList<IProductDescriptor>();
207
		ETList<IProductDescriptor> descList = new ETArrayList<IProductDescriptor>();
208
		if (m_CoreProducts != null && m_CoreProducts.size() > 0)
208
		if (m_CoreProducts != null && m_CoreProducts.size() > 0)
209
		{
209
		{
210
			Enumeration enumVal = m_CoreProducts.keys();
210
			Enumeration<Integer> enumVal = m_CoreProducts.keys();
211
			int count = m_CoreProducts.size();
211
			int count = m_CoreProducts.size();
212
			descs = new ProductDescriptor[count];
212
			descs = new ProductDescriptor[count];
213
			int i=0;
213
			int i=0;
214
			while (enumVal.hasMoreElements())
214
			while (enumVal.hasMoreElements())
215
			{
215
			{
216
				IProductDescriptor desc = new ProductDescriptor();
216
				IProductDescriptor desc = new ProductDescriptor();
217
				String obj = (String)enumVal.nextElement();				
217
				Integer obj = enumVal.nextElement();				
218
				if (obj != null)
218
				if (obj != null)
219
				{
219
				{
220
					ICoreProduct prod = m_CoreProducts.get(obj);
220
					ICoreProduct prod = m_CoreProducts.get(obj);
221
					desc.setProcessID(Integer.parseInt(obj));
221
					desc.setProcessID(obj);
222
					desc.setCoreProduct(prod);
222
					desc.setCoreProduct(prod);
223
					descList.add(i,desc);
223
					descList.add(i,desc);
224
					i++;
224
					i++;

Return to bug 112520