Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 211841 Details for
Bug 371252
[Protocol] Use JSON arrays for operations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
server changes
clipboard.txt (text/plain), 2.19 KB, created by
Ralf Sternberg
on 2012-02-29 15:51:32 EST
(
hide
)
Description:
server changes
Filename:
MIME Type:
Creator:
Ralf Sternberg
Created:
2012-02-29 15:51:32 EST
Size:
2.19 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt >Index: src/org/eclipse/rwt/internal/protocol/Operation.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/rwt/internal/protocol/Operation.java,v >retrieving revision 1.6 >diff -u -r1.6 Operation.java >--- src/org/eclipse/rwt/internal/protocol/Operation.java 30 Nov 2011 22:18:10 -0000 1.6 >+++ src/org/eclipse/rwt/internal/protocol/Operation.java 29 Feb 2012 20:48:48 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2011 EclipseSource and others. >+ * Copyright (c) 2011, 2012 EclipseSource and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -10,9 +10,11 @@ > ******************************************************************************/ > package org.eclipse.rwt.internal.protocol; > >-import java.util.*; >+import java.util.LinkedHashMap; >+import java.util.Map; >+import java.util.Set; > >-import org.eclipse.rwt.internal.theme.JsonObject; >+import org.eclipse.rwt.internal.theme.JsonArray; > import org.eclipse.rwt.internal.theme.JsonValue; > > >@@ -69,19 +71,19 @@ > details.put( key, value ); > } > >- JsonObject toJson() { >- JsonObject json = new JsonObject(); >- json.append( ProtocolConstants.OPERATION_TARGET, target ); >- json.append( ProtocolConstants.OPERATION_ACTION, action ); >+ JsonValue toJson() { >+ JsonArray json = new JsonArray(); >+ json.append( target ); >+ json.append( action ); > if( !details.isEmpty() ) { > Set<String> keySet = details.keySet(); > for( String key : keySet ) { >- json.append( key, JsonUtil.createJsonValue( details.get( key ) ) ); >+ json.append( JsonUtil.createJsonValue( details.get( key ) ) ); > } > } > if( !properties.isEmpty() ) { > JsonValue jsonObject = JsonUtil.createJsonObject( properties ); >- json.append( ProtocolConstants.OPERATION_PROPERTIES, jsonObject ); >+ json.append( jsonObject ); > } > return json; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 371252
:
211793
| 211841