id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
161,900 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java | Layout.layoutChildren | public void layoutChildren() {
Set<Integer> copySet;
synchronized (mMeasuredChildren) {
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "layoutChildren [%d] layout = %s",
mMeasuredChildren.size(), this);
copySet = new HashSet<>(mMeasuredChildren);
}
for (int... | java | public void layoutChildren() {
Set<Integer> copySet;
synchronized (mMeasuredChildren) {
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "layoutChildren [%d] layout = %s",
mMeasuredChildren.size(), this);
copySet = new HashSet<>(mMeasuredChildren);
}
for (int... | [
"public",
"void",
"layoutChildren",
"(",
")",
"{",
"Set",
"<",
"Integer",
">",
"copySet",
";",
"synchronized",
"(",
"mMeasuredChildren",
")",
"{",
"Log",
".",
"d",
"(",
"Log",
".",
"SUBSYSTEM",
".",
"LAYOUT",
",",
"TAG",
",",
"\"layoutChildren [%d] layout = ... | Layout children inside the layout container | [
"Layout",
"children",
"inside",
"the",
"layout",
"container"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java#L422-L440 |
161,901 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java | Layout.getViewPortSize | protected float getViewPortSize(final Axis axis) {
float size = mViewPort == null ? 0 : mViewPort.get(axis);
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "getViewPortSize for %s %f mViewPort = %s", axis, size, mViewPort);
return size;
} | java | protected float getViewPortSize(final Axis axis) {
float size = mViewPort == null ? 0 : mViewPort.get(axis);
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "getViewPortSize for %s %f mViewPort = %s", axis, size, mViewPort);
return size;
} | [
"protected",
"float",
"getViewPortSize",
"(",
"final",
"Axis",
"axis",
")",
"{",
"float",
"size",
"=",
"mViewPort",
"==",
"null",
"?",
"0",
":",
"mViewPort",
".",
"get",
"(",
"axis",
")",
";",
"Log",
".",
"d",
"(",
"Log",
".",
"SUBSYSTEM",
".",
"LAYO... | Get viewport size along the axis
@param axis {@link Axis}
@return size | [
"Get",
"viewport",
"size",
"along",
"the",
"axis"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java#L740-L744 |
161,902 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java | Layout.layoutChild | protected void layoutChild(final int dataIndex) {
Widget child = mContainer.get(dataIndex);
if (child != null) {
float offset = mOffset.get(Axis.X);
if (!equal(offset, 0)) {
updateTransform(child, Axis.X, offset);
}
offset = mOffset.get(Ax... | java | protected void layoutChild(final int dataIndex) {
Widget child = mContainer.get(dataIndex);
if (child != null) {
float offset = mOffset.get(Axis.X);
if (!equal(offset, 0)) {
updateTransform(child, Axis.X, offset);
}
offset = mOffset.get(Ax... | [
"protected",
"void",
"layoutChild",
"(",
"final",
"int",
"dataIndex",
")",
"{",
"Widget",
"child",
"=",
"mContainer",
".",
"get",
"(",
"dataIndex",
")",
";",
"if",
"(",
"child",
"!=",
"null",
")",
"{",
"float",
"offset",
"=",
"mOffset",
".",
"get",
"("... | Position the child inside the layout based on the offset and axis-s factors
@param dataIndex data index | [
"Position",
"the",
"child",
"inside",
"the",
"layout",
"based",
"on",
"the",
"offset",
"and",
"axis",
"-",
"s",
"factors"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java#L780-L798 |
161,903 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java | Layout.postLayoutChild | protected void postLayoutChild(final int dataIndex) {
if (!mContainer.isDynamic()) {
boolean visibleInLayout = !mViewPort.isClippingEnabled() || inViewPort(dataIndex);
ViewPortVisibility visibility = visibleInLayout ?
ViewPortVisibility.FULLY_VISIBLE : ViewPortVisibil... | java | protected void postLayoutChild(final int dataIndex) {
if (!mContainer.isDynamic()) {
boolean visibleInLayout = !mViewPort.isClippingEnabled() || inViewPort(dataIndex);
ViewPortVisibility visibility = visibleInLayout ?
ViewPortVisibility.FULLY_VISIBLE : ViewPortVisibil... | [
"protected",
"void",
"postLayoutChild",
"(",
"final",
"int",
"dataIndex",
")",
"{",
"if",
"(",
"!",
"mContainer",
".",
"isDynamic",
"(",
")",
")",
"{",
"boolean",
"visibleInLayout",
"=",
"!",
"mViewPort",
".",
"isClippingEnabled",
"(",
")",
"||",
"inViewPort... | Do post exam of child inside the layout after it has been positioned in parent
@param dataIndex data index | [
"Do",
"post",
"exam",
"of",
"child",
"inside",
"the",
"layout",
"after",
"it",
"has",
"been",
"positioned",
"in",
"parent"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java#L804-L817 |
161,904 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCollider.java | GVRCollider.lookup | static GVRCollider lookup(long nativePointer)
{
synchronized (sColliders)
{
WeakReference<GVRCollider> weakReference = sColliders.get(nativePointer);
return weakReference == null ? null : weakReference.get();
}
} | java | static GVRCollider lookup(long nativePointer)
{
synchronized (sColliders)
{
WeakReference<GVRCollider> weakReference = sColliders.get(nativePointer);
return weakReference == null ? null : weakReference.get();
}
} | [
"static",
"GVRCollider",
"lookup",
"(",
"long",
"nativePointer",
")",
"{",
"synchronized",
"(",
"sColliders",
")",
"{",
"WeakReference",
"<",
"GVRCollider",
">",
"weakReference",
"=",
"sColliders",
".",
"get",
"(",
"nativePointer",
")",
";",
"return",
"weakRefer... | Lookup a native pointer to a collider and return its Java object.
@param nativePointer native pointer to C++ Collider
@return Java GVRCollider object | [
"Lookup",
"a",
"native",
"pointer",
"to",
"a",
"collider",
"and",
"return",
"its",
"Java",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCollider.java#L87-L94 |
161,905 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRCubeSceneObject.java | GVRCubeSceneObject.createSimpleCubeSixMeshes | private void createSimpleCubeSixMeshes(GVRContext gvrContext,
boolean facingOut, String vertexDesc, ArrayList<GVRTexture> textureList)
{
GVRSceneObject[] children = new GVRSceneObject[6];
GVRMesh[] meshes = new GVRMesh[6];
GVRVertexBuffer vbuf = new GVRVertexBuffer(gvrContext, ve... | java | private void createSimpleCubeSixMeshes(GVRContext gvrContext,
boolean facingOut, String vertexDesc, ArrayList<GVRTexture> textureList)
{
GVRSceneObject[] children = new GVRSceneObject[6];
GVRMesh[] meshes = new GVRMesh[6];
GVRVertexBuffer vbuf = new GVRVertexBuffer(gvrContext, ve... | [
"private",
"void",
"createSimpleCubeSixMeshes",
"(",
"GVRContext",
"gvrContext",
",",
"boolean",
"facingOut",
",",
"String",
"vertexDesc",
",",
"ArrayList",
"<",
"GVRTexture",
">",
"textureList",
")",
"{",
"GVRSceneObject",
"[",
"]",
"children",
"=",
"new",
"GVRSc... | Creates a cube with each face as a separate mesh using a different texture.
The meshes will share a common vertex array but will have separate index buffers.
@param gvrContext context to use for creating cube
@param facingOut true for outward normals, false for inward normals
@param vertexDesc string describi... | [
"Creates",
"a",
"cube",
"with",
"each",
"face",
"as",
"a",
"separate",
"mesh",
"using",
"a",
"different",
"texture",
".",
"The",
"meshes",
"will",
"share",
"a",
"common",
"vertex",
"array",
"but",
"will",
"have",
"separate",
"index",
"buffers",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRCubeSceneObject.java#L553-L594 |
161,906 | Samsung/GearVRf | GVRf/Extensions/MixedReality/src/main/java/org/gearvrf/mixedreality/arcore/ARCorePlane.java | ARCorePlane.update | protected void update(float scale) {
GVRSceneObject owner = getOwnerObject();
if (isEnabled() && (owner != null) && owner.isEnabled())
{
float w = getWidth();
float h = getHeight();
mPose.update(mARPlane.getCenterPose(), scale);
Matrix4f m = new Ma... | java | protected void update(float scale) {
GVRSceneObject owner = getOwnerObject();
if (isEnabled() && (owner != null) && owner.isEnabled())
{
float w = getWidth();
float h = getHeight();
mPose.update(mARPlane.getCenterPose(), scale);
Matrix4f m = new Ma... | [
"protected",
"void",
"update",
"(",
"float",
"scale",
")",
"{",
"GVRSceneObject",
"owner",
"=",
"getOwnerObject",
"(",
")",
";",
"if",
"(",
"isEnabled",
"(",
")",
"&&",
"(",
"owner",
"!=",
"null",
")",
"&&",
"owner",
".",
"isEnabled",
"(",
")",
")",
... | Update the plane based on arcore best knowledge of the world
@param scale | [
"Update",
"the",
"plane",
"based",
"on",
"arcore",
"best",
"knowledge",
"of",
"the",
"world"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/MixedReality/src/main/java/org/gearvrf/mixedreality/arcore/ARCorePlane.java#L123-L135 |
161,907 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRPositionKey.java | GVRPositionKey.setValue | public void setValue(Vector3f pos) {
mX = pos.x;
mY = pos.y;
mZ = pos.z;
} | java | public void setValue(Vector3f pos) {
mX = pos.x;
mY = pos.y;
mZ = pos.z;
} | [
"public",
"void",
"setValue",
"(",
"Vector3f",
"pos",
")",
"{",
"mX",
"=",
"pos",
".",
"x",
";",
"mY",
"=",
"pos",
".",
"y",
";",
"mZ",
"=",
"pos",
".",
"z",
";",
"}"
] | Sets the position vector of the keyframe. | [
"Sets",
"the",
"position",
"vector",
"of",
"the",
"keyframe",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRPositionKey.java#L42-L46 |
161,908 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRFloatAnimation.java | GVRFloatAnimation.getKey | public void getKey(int keyIndex, float[] values)
{
int index = keyIndex * mFloatsPerKey;
System.arraycopy(mKeys, index + 1, values, 0, values.length);
} | java | public void getKey(int keyIndex, float[] values)
{
int index = keyIndex * mFloatsPerKey;
System.arraycopy(mKeys, index + 1, values, 0, values.length);
} | [
"public",
"void",
"getKey",
"(",
"int",
"keyIndex",
",",
"float",
"[",
"]",
"values",
")",
"{",
"int",
"index",
"=",
"keyIndex",
"*",
"mFloatsPerKey",
";",
"System",
".",
"arraycopy",
"(",
"mKeys",
",",
"index",
"+",
"1",
",",
"values",
",",
"0",
","... | Returns the key value in the given array.
@param keyIndex the index of the scale key | [
"Returns",
"the",
"key",
"value",
"in",
"the",
"given",
"array",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRFloatAnimation.java#L321-L325 |
161,909 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRFloatAnimation.java | GVRFloatAnimation.setKey | public void setKey(int keyIndex, float time, final float[] values)
{
int index = keyIndex * mFloatsPerKey;
Integer valSize = mFloatsPerKey-1;
if (values.length != valSize)
{
throw new IllegalArgumentException("This key needs " + valSize.toString() + " float per value");
... | java | public void setKey(int keyIndex, float time, final float[] values)
{
int index = keyIndex * mFloatsPerKey;
Integer valSize = mFloatsPerKey-1;
if (values.length != valSize)
{
throw new IllegalArgumentException("This key needs " + valSize.toString() + " float per value");
... | [
"public",
"void",
"setKey",
"(",
"int",
"keyIndex",
",",
"float",
"time",
",",
"final",
"float",
"[",
"]",
"values",
")",
"{",
"int",
"index",
"=",
"keyIndex",
"*",
"mFloatsPerKey",
";",
"Integer",
"valSize",
"=",
"mFloatsPerKey",
"-",
"1",
";",
"if",
... | Set the time and value of the key at the given index
@param keyIndex 0 based index of key
@param time key time in seconds
@param values key values | [
"Set",
"the",
"time",
"and",
"value",
"of",
"the",
"key",
"at",
"the",
"given",
"index"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRFloatAnimation.java#L333-L344 |
161,910 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRFloatAnimation.java | GVRFloatAnimation.resizeKeys | public void resizeKeys(int numKeys)
{
int n = numKeys * mFloatsPerKey;
if (mKeys.length == n)
{
return;
}
float[] newKeys = new float[n];
n = Math.min(n, mKeys.length);
System.arraycopy(mKeys, 0, newKeys, 0, n);
mKeys = newKeys;
mF... | java | public void resizeKeys(int numKeys)
{
int n = numKeys * mFloatsPerKey;
if (mKeys.length == n)
{
return;
}
float[] newKeys = new float[n];
n = Math.min(n, mKeys.length);
System.arraycopy(mKeys, 0, newKeys, 0, n);
mKeys = newKeys;
mF... | [
"public",
"void",
"resizeKeys",
"(",
"int",
"numKeys",
")",
"{",
"int",
"n",
"=",
"numKeys",
"*",
"mFloatsPerKey",
";",
"if",
"(",
"mKeys",
".",
"length",
"==",
"n",
")",
"{",
"return",
";",
"}",
"float",
"[",
"]",
"newKeys",
"=",
"new",
"float",
"... | Resize the key data area.
This function will truncate the keys if the
initial setting was too large.
@oaran numKeys the desired number of keys | [
"Resize",
"the",
"key",
"data",
"area",
".",
"This",
"function",
"will",
"truncate",
"the",
"keys",
"if",
"the",
"initial",
"setting",
"was",
"too",
"large",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRFloatAnimation.java#L365-L378 |
161,911 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRComponent.java | GVRComponent.setEnable | public void setEnable(boolean flag) {
if (flag == mIsEnabled)
return;
mIsEnabled = flag;
if (getNative() != 0)
{
NativeComponent.setEnable(getNative(), flag);
}
if (flag)
{
onEnable();
}
else
{
... | java | public void setEnable(boolean flag) {
if (flag == mIsEnabled)
return;
mIsEnabled = flag;
if (getNative() != 0)
{
NativeComponent.setEnable(getNative(), flag);
}
if (flag)
{
onEnable();
}
else
{
... | [
"public",
"void",
"setEnable",
"(",
"boolean",
"flag",
")",
"{",
"if",
"(",
"flag",
"==",
"mIsEnabled",
")",
"return",
";",
"mIsEnabled",
"=",
"flag",
";",
"if",
"(",
"getNative",
"(",
")",
"!=",
"0",
")",
"{",
"NativeComponent",
".",
"setEnable",
"(",... | Enable or disable this component.
@param flag true to enable, false to disable.
@see #enable()
@see #disable()
@see #isEnabled() | [
"Enable",
"or",
"disable",
"this",
"component",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRComponent.java#L127-L145 |
161,912 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/asynchronous/AsyncManager.java | AsyncManager.registerDatatype | public void registerDatatype(Class<? extends GVRHybridObject> textureClass,
AsyncLoaderFactory<? extends GVRHybridObject, ?> asyncLoaderFactory) {
mFactories.put(textureClass, asyncLoaderFactory);
} | java | public void registerDatatype(Class<? extends GVRHybridObject> textureClass,
AsyncLoaderFactory<? extends GVRHybridObject, ?> asyncLoaderFactory) {
mFactories.put(textureClass, asyncLoaderFactory);
} | [
"public",
"void",
"registerDatatype",
"(",
"Class",
"<",
"?",
"extends",
"GVRHybridObject",
">",
"textureClass",
",",
"AsyncLoaderFactory",
"<",
"?",
"extends",
"GVRHybridObject",
",",
"?",
">",
"asyncLoaderFactory",
")",
"{",
"mFactories",
".",
"put",
"(",
"tex... | Loaders call this method to register themselves. This method can be called by
loaders provided by the application.
@param textureClass
The class the loader is responsible for loading.
@param asyncLoaderFactory
The factory object. | [
"Loaders",
"call",
"this",
"method",
"to",
"register",
"themselves",
".",
"This",
"method",
"can",
"be",
"called",
"by",
"loaders",
"provided",
"by",
"the",
"application",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/asynchronous/AsyncManager.java#L63-L66 |
161,913 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java | GVRContext.assertGLThread | public void assertGLThread() {
if (Thread.currentThread().getId() != mGLThreadID) {
RuntimeException e = new RuntimeException(
"Should not run GL functions from a non-GL thread!");
e.printStackTrace();
throw e;
}
} | java | public void assertGLThread() {
if (Thread.currentThread().getId() != mGLThreadID) {
RuntimeException e = new RuntimeException(
"Should not run GL functions from a non-GL thread!");
e.printStackTrace();
throw e;
}
} | [
"public",
"void",
"assertGLThread",
"(",
")",
"{",
"if",
"(",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getId",
"(",
")",
"!=",
"mGLThreadID",
")",
"{",
"RuntimeException",
"e",
"=",
"new",
"RuntimeException",
"(",
"\"Should not run GL functions from a non... | Throws an exception if the current thread is not a GL thread.
@since 1.6.5 | [
"Throws",
"an",
"exception",
"if",
"the",
"current",
"thread",
"is",
"not",
"a",
"GL",
"thread",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java#L281-L288 |
161,914 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java | GVRContext.logError | public void logError(String message, Object sender) {
getEventManager().sendEvent(this, IErrorEvents.class, "onError", new Object[] { message, sender });
} | java | public void logError(String message, Object sender) {
getEventManager().sendEvent(this, IErrorEvents.class, "onError", new Object[] { message, sender });
} | [
"public",
"void",
"logError",
"(",
"String",
"message",
",",
"Object",
"sender",
")",
"{",
"getEventManager",
"(",
")",
".",
"sendEvent",
"(",
"this",
",",
"IErrorEvents",
".",
"class",
",",
"\"onError\"",
",",
"new",
"Object",
"[",
"]",
"{",
"message",
... | Logs an error by sending an error event to all listeners.
Error events can be generated by any part of GearVRF,
from any thread. They are always sent to the event receiver
of the GVRContext.
@param message error message
@param sender object which had the error
@see IErrorEvents | [
"Logs",
"an",
"error",
"by",
"sending",
"an",
"error",
"event",
"to",
"all",
"listeners",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java#L353-L355 |
161,915 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java | GVRContext.stopDebugServer | public synchronized void stopDebugServer() {
if (mDebugServer == null) {
Log.e(TAG, "Debug server is not running.");
return;
}
mDebugServer.shutdown();
mDebugServer = null;
} | java | public synchronized void stopDebugServer() {
if (mDebugServer == null) {
Log.e(TAG, "Debug server is not running.");
return;
}
mDebugServer.shutdown();
mDebugServer = null;
} | [
"public",
"synchronized",
"void",
"stopDebugServer",
"(",
")",
"{",
"if",
"(",
"mDebugServer",
"==",
"null",
")",
"{",
"Log",
".",
"e",
"(",
"TAG",
",",
"\"Debug server is not running.\"",
")",
";",
"return",
";",
"}",
"mDebugServer",
".",
"shutdown",
"(",
... | Stops the current debug server. Active connections are
not affected. | [
"Stops",
"the",
"current",
"debug",
"server",
".",
"Active",
"connections",
"are",
"not",
"affected",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java#L361-L369 |
161,916 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java | GVRContext.showToast | public void showToast(final String message, float duration) {
final float quadWidth = 1.2f;
final GVRTextViewSceneObject toastSceneObject = new GVRTextViewSceneObject(this, quadWidth, quadWidth / 5,
message);
toastSceneObject.setTextSize(6);
toastSceneObject.setTextColor... | java | public void showToast(final String message, float duration) {
final float quadWidth = 1.2f;
final GVRTextViewSceneObject toastSceneObject = new GVRTextViewSceneObject(this, quadWidth, quadWidth / 5,
message);
toastSceneObject.setTextSize(6);
toastSceneObject.setTextColor... | [
"public",
"void",
"showToast",
"(",
"final",
"String",
"message",
",",
"float",
"duration",
")",
"{",
"final",
"float",
"quadWidth",
"=",
"1.2f",
";",
"final",
"GVRTextViewSceneObject",
"toastSceneObject",
"=",
"new",
"GVRTextViewSceneObject",
"(",
"this",
",",
... | Show a toast-like message for the specified duration
@param message
@param duration in seconds | [
"Show",
"a",
"toast",
"-",
"like",
"message",
"for",
"the",
"specified",
"duration"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java#L702-L754 |
161,917 | Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFVec2f.java | MFVec2f.append | public void append(float[] newValue) {
if ( (newValue.length % 2) == 0) {
for (int i = 0; i < (newValue.length/2); i++) {
value.add( new SFVec2f(newValue[i*2], newValue[i*2+1]) );
}
}
else {
Log.e(TAG, "X3D MFVec3f append set with array length ... | java | public void append(float[] newValue) {
if ( (newValue.length % 2) == 0) {
for (int i = 0; i < (newValue.length/2); i++) {
value.add( new SFVec2f(newValue[i*2], newValue[i*2+1]) );
}
}
else {
Log.e(TAG, "X3D MFVec3f append set with array length ... | [
"public",
"void",
"append",
"(",
"float",
"[",
"]",
"newValue",
")",
"{",
"if",
"(",
"(",
"newValue",
".",
"length",
"%",
"2",
")",
"==",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"(",
"newValue",
".",
"length",
"/",
"2"... | Places a new value at the end of the existing value array, increasing the field length accordingly.
@param newValue - the 2 floats making the new SFVec2f appended to the MFVec2f array list | [
"Places",
"a",
"new",
"value",
"at",
"the",
"end",
"of",
"the",
"existing",
"value",
"array",
"increasing",
"the",
"field",
"length",
"accordingly",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFVec2f.java#L70-L79 |
161,918 | Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFVec2f.java | MFVec2f.insertValue | public void insertValue(int index, float[] newValue) {
if ( newValue.length == 2) {
try {
value.add( index, new SFVec2f(newValue[0], newValue[1]) );
}
catch (IndexOutOfBoundsException e) {
Log.e(TAG, "X3D MFVec2f get1Value(index) out of bounds.... | java | public void insertValue(int index, float[] newValue) {
if ( newValue.length == 2) {
try {
value.add( index, new SFVec2f(newValue[0], newValue[1]) );
}
catch (IndexOutOfBoundsException e) {
Log.e(TAG, "X3D MFVec2f get1Value(index) out of bounds.... | [
"public",
"void",
"insertValue",
"(",
"int",
"index",
",",
"float",
"[",
"]",
"newValue",
")",
"{",
"if",
"(",
"newValue",
".",
"length",
"==",
"2",
")",
"{",
"try",
"{",
"value",
".",
"add",
"(",
"index",
",",
"new",
"SFVec2f",
"(",
"newValue",
"[... | Insert a new value prior to the index location in the existing value array,
increasing the field length accordingly.
@param index - where the new values in an SFVec2f object will be placed in the array list
@param newValue - the new x, y value for the array list | [
"Insert",
"a",
"new",
"value",
"prior",
"to",
"the",
"index",
"location",
"in",
"the",
"existing",
"value",
"array",
"increasing",
"the",
"field",
"length",
"accordingly",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFVec2f.java#L134-L149 |
161,919 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRSpotLight.java | GVRSpotLight.setOuterConeAngle | public void setOuterConeAngle(float angle)
{
setFloat("outer_cone_angle", (float) Math.cos(Math.toRadians(angle)));
mChanged.set(true);
} | java | public void setOuterConeAngle(float angle)
{
setFloat("outer_cone_angle", (float) Math.cos(Math.toRadians(angle)));
mChanged.set(true);
} | [
"public",
"void",
"setOuterConeAngle",
"(",
"float",
"angle",
")",
"{",
"setFloat",
"(",
"\"outer_cone_angle\"",
",",
"(",
"float",
")",
"Math",
".",
"cos",
"(",
"Math",
".",
"toRadians",
"(",
"angle",
")",
")",
")",
";",
"mChanged",
".",
"set",
"(",
"... | Set the inner angle of the spotlight cone in degrees.
Beyond the outer cone angle there is no illumination.
The underlying uniform "outer_cone_angle" is the cosine
of this input angle. If the inner cone angle is larger than the outer cone angle
there will be unexpected results.
@see #setInnerConeAngle(float)
@see #get... | [
"Set",
"the",
"inner",
"angle",
"of",
"the",
"spotlight",
"cone",
"in",
"degrees",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRSpotLight.java#L144-L148 |
161,920 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRSpotLight.java | GVRSpotLight.setCastShadow | public void setCastShadow(boolean enableFlag)
{
GVRSceneObject owner = getOwnerObject();
if (owner != null)
{
GVRShadowMap shadowMap = (GVRShadowMap) getComponent(GVRRenderTarget.getComponentType());
if (enableFlag)
{
if (shadowMap != null... | java | public void setCastShadow(boolean enableFlag)
{
GVRSceneObject owner = getOwnerObject();
if (owner != null)
{
GVRShadowMap shadowMap = (GVRShadowMap) getComponent(GVRRenderTarget.getComponentType());
if (enableFlag)
{
if (shadowMap != null... | [
"public",
"void",
"setCastShadow",
"(",
"boolean",
"enableFlag",
")",
"{",
"GVRSceneObject",
"owner",
"=",
"getOwnerObject",
"(",
")",
";",
"if",
"(",
"owner",
"!=",
"null",
")",
"{",
"GVRShadowMap",
"shadowMap",
"=",
"(",
"GVRShadowMap",
")",
"getComponent",
... | Enables or disabled shadow casting for a spot light.
Enabling shadows attaches a GVRShadowMap component to the
GVRSceneObject which owns the light and provides the
component with an perspective camera for shadow casting.
@param enableFlag true to enable shadow casting, false to disable | [
"Enables",
"or",
"disabled",
"shadow",
"casting",
"for",
"a",
"spot",
"light",
".",
"Enabling",
"shadows",
"attaches",
"a",
"GVRShadowMap",
"component",
"to",
"the",
"GVRSceneObject",
"which",
"owns",
"the",
"light",
"and",
"provides",
"the",
"component",
"with"... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRSpotLight.java#L157-L185 |
161,921 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java | GVRInputManager.findCursorController | public GVRCursorController findCursorController(GVRControllerType type) {
for (int index = 0, size = cache.size(); index < size; index++)
{
int key = cache.keyAt(index);
GVRCursorController controller = cache.get(key);
if (controller.getControllerType().equals(type)) ... | java | public GVRCursorController findCursorController(GVRControllerType type) {
for (int index = 0, size = cache.size(); index < size; index++)
{
int key = cache.keyAt(index);
GVRCursorController controller = cache.get(key);
if (controller.getControllerType().equals(type)) ... | [
"public",
"GVRCursorController",
"findCursorController",
"(",
"GVRControllerType",
"type",
")",
"{",
"for",
"(",
"int",
"index",
"=",
"0",
",",
"size",
"=",
"cache",
".",
"size",
"(",
")",
";",
"index",
"<",
"size",
";",
"index",
"++",
")",
"{",
"int",
... | Get the first controller of a specified type
@param type controller type to search for
@return controller found or null if no controllers of the given type | [
"Get",
"the",
"first",
"controller",
"of",
"a",
"specified",
"type"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java#L372-L382 |
161,922 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java | GVRInputManager.clear | public int clear()
{
int n = 0;
for (GVRCursorController c : controllers)
{
c.stopDrag();
removeCursorController(c);
++n;
}
return n;
} | java | public int clear()
{
int n = 0;
for (GVRCursorController c : controllers)
{
c.stopDrag();
removeCursorController(c);
++n;
}
return n;
} | [
"public",
"int",
"clear",
"(",
")",
"{",
"int",
"n",
"=",
"0",
";",
"for",
"(",
"GVRCursorController",
"c",
":",
"controllers",
")",
"{",
"c",
".",
"stopDrag",
"(",
")",
";",
"removeCursorController",
"(",
"c",
")",
";",
"++",
"n",
";",
"}",
"retur... | Remove all controllers but leave input manager running.
@return number of controllers removed | [
"Remove",
"all",
"controllers",
"but",
"leave",
"input",
"manager",
"running",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java#L435-L445 |
161,923 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java | GVRInputManager.close | public void close()
{
inputManager.unregisterInputDeviceListener(inputDeviceListener);
mouseDeviceManager.forceStopThread();
gamepadDeviceManager.forceStopThread();
controllerIds.clear();
cache.clear();
controllers.clear();
} | java | public void close()
{
inputManager.unregisterInputDeviceListener(inputDeviceListener);
mouseDeviceManager.forceStopThread();
gamepadDeviceManager.forceStopThread();
controllerIds.clear();
cache.clear();
controllers.clear();
} | [
"public",
"void",
"close",
"(",
")",
"{",
"inputManager",
".",
"unregisterInputDeviceListener",
"(",
"inputDeviceListener",
")",
";",
"mouseDeviceManager",
".",
"forceStopThread",
"(",
")",
";",
"gamepadDeviceManager",
".",
"forceStopThread",
"(",
")",
";",
"control... | Shut down the input manager.
After this call, GearVRf will not be able to access IO devices. | [
"Shut",
"down",
"the",
"input",
"manager",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java#L452-L460 |
161,924 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java | GVRInputManager.getUniqueControllerId | private GVRCursorController getUniqueControllerId(int deviceId) {
GVRCursorController controller = controllerIds.get(deviceId);
if (controller != null) {
return controller;
}
return null;
} | java | private GVRCursorController getUniqueControllerId(int deviceId) {
GVRCursorController controller = controllerIds.get(deviceId);
if (controller != null) {
return controller;
}
return null;
} | [
"private",
"GVRCursorController",
"getUniqueControllerId",
"(",
"int",
"deviceId",
")",
"{",
"GVRCursorController",
"controller",
"=",
"controllerIds",
".",
"get",
"(",
"deviceId",
")",
";",
"if",
"(",
"controller",
"!=",
"null",
")",
"{",
"return",
"controller",
... | returns null if no device is found. | [
"returns",
"null",
"if",
"no",
"device",
"is",
"found",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java#L463-L469 |
161,925 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java | GVRInputManager.getCacheKey | private int getCacheKey(InputDevice device, GVRControllerType controllerType) {
if (controllerType != GVRControllerType.UNKNOWN &&
controllerType != GVRControllerType.EXTERNAL) {
// Sometimes a device shows up using two device ids
// here we try to show both devices as one us... | java | private int getCacheKey(InputDevice device, GVRControllerType controllerType) {
if (controllerType != GVRControllerType.UNKNOWN &&
controllerType != GVRControllerType.EXTERNAL) {
// Sometimes a device shows up using two device ids
// here we try to show both devices as one us... | [
"private",
"int",
"getCacheKey",
"(",
"InputDevice",
"device",
",",
"GVRControllerType",
"controllerType",
")",
"{",
"if",
"(",
"controllerType",
"!=",
"GVRControllerType",
".",
"UNKNOWN",
"&&",
"controllerType",
"!=",
"GVRControllerType",
".",
"EXTERNAL",
")",
"{",... | Return the key if there is one else return -1 | [
"Return",
"the",
"key",
"if",
"there",
"is",
"one",
"else",
"return",
"-",
"1"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java#L511-L525 |
161,926 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java | GVRInputManager.addDevice | private GVRCursorController addDevice(int deviceId) {
InputDevice device = inputManager.getInputDevice(deviceId);
GVRControllerType controllerType = getGVRInputDeviceType(device);
if (mEnabledControllerTypes == null)
{
return null;
}
if (controllerType == GVR... | java | private GVRCursorController addDevice(int deviceId) {
InputDevice device = inputManager.getInputDevice(deviceId);
GVRControllerType controllerType = getGVRInputDeviceType(device);
if (mEnabledControllerTypes == null)
{
return null;
}
if (controllerType == GVR... | [
"private",
"GVRCursorController",
"addDevice",
"(",
"int",
"deviceId",
")",
"{",
"InputDevice",
"device",
"=",
"inputManager",
".",
"getInputDevice",
"(",
"deviceId",
")",
";",
"GVRControllerType",
"controllerType",
"=",
"getGVRInputDeviceType",
"(",
"device",
")",
... | returns controller if a new device is found | [
"returns",
"controller",
"if",
"a",
"new",
"device",
"is",
"found"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/io/GVRInputManager.java#L528-L587 |
161,927 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTexture.java | GVRTexture.getAtlasInformation | public List<GVRAtlasInformation> getAtlasInformation()
{
if ((mImage != null) && (mImage instanceof GVRImageAtlas))
{
return ((GVRImageAtlas) mImage).getAtlasInformation();
}
return null;
} | java | public List<GVRAtlasInformation> getAtlasInformation()
{
if ((mImage != null) && (mImage instanceof GVRImageAtlas))
{
return ((GVRImageAtlas) mImage).getAtlasInformation();
}
return null;
} | [
"public",
"List",
"<",
"GVRAtlasInformation",
">",
"getAtlasInformation",
"(",
")",
"{",
"if",
"(",
"(",
"mImage",
"!=",
"null",
")",
"&&",
"(",
"mImage",
"instanceof",
"GVRImageAtlas",
")",
")",
"{",
"return",
"(",
"(",
"GVRImageAtlas",
")",
"mImage",
")"... | Returns the list of atlas information necessary to map
the texture atlas to each scene object.
@return List of atlas information. | [
"Returns",
"the",
"list",
"of",
"atlas",
"information",
"necessary",
"to",
"map",
"the",
"texture",
"atlas",
"to",
"each",
"scene",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTexture.java#L206-L213 |
161,928 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTexture.java | GVRTexture.setImage | public void setImage(final GVRImage imageData)
{
mImage = imageData;
if (imageData != null)
NativeTexture.setImage(getNative(), imageData, imageData.getNative());
else
NativeTexture.setImage(getNative(), null, 0);
} | java | public void setImage(final GVRImage imageData)
{
mImage = imageData;
if (imageData != null)
NativeTexture.setImage(getNative(), imageData, imageData.getNative());
else
NativeTexture.setImage(getNative(), null, 0);
} | [
"public",
"void",
"setImage",
"(",
"final",
"GVRImage",
"imageData",
")",
"{",
"mImage",
"=",
"imageData",
";",
"if",
"(",
"imageData",
"!=",
"null",
")",
"NativeTexture",
".",
"setImage",
"(",
"getNative",
"(",
")",
",",
"imageData",
",",
"imageData",
"."... | Changes the image data associated with a GVRTexture.
This can be a simple bitmap, a compressed bitmap,
a cubemap or a compressed cubemap.
@param imageData data for the texture as a GVRImate | [
"Changes",
"the",
"image",
"data",
"associated",
"with",
"a",
"GVRTexture",
".",
"This",
"can",
"be",
"a",
"simple",
"bitmap",
"a",
"compressed",
"bitmap",
"a",
"cubemap",
"or",
"a",
"compressed",
"cubemap",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTexture.java#L251-L258 |
161,929 | Samsung/GearVRf | GVRf/Extensions/3DCursor/IODevices/gearwear/PhoneSide/gearinputprovider/src/main/java/com/samsung/mpl/gearinputprovider/backend/InputProviderService.java | InputProviderService.sendEvent | public static void sendEvent(Context context, Parcelable event) {
Intent intent = new Intent(EventManager.ACTION_ACCESSORY_EVENT);
intent.putExtra(EventManager.EXTRA_EVENT, event);
context.sendBroadcast(intent);
} | java | public static void sendEvent(Context context, Parcelable event) {
Intent intent = new Intent(EventManager.ACTION_ACCESSORY_EVENT);
intent.putExtra(EventManager.EXTRA_EVENT, event);
context.sendBroadcast(intent);
} | [
"public",
"static",
"void",
"sendEvent",
"(",
"Context",
"context",
",",
"Parcelable",
"event",
")",
"{",
"Intent",
"intent",
"=",
"new",
"Intent",
"(",
"EventManager",
".",
"ACTION_ACCESSORY_EVENT",
")",
";",
"intent",
".",
"putExtra",
"(",
"EventManager",
".... | Send an event to other applications
@param context context in which to send the broadcast
@param event event to send | [
"Send",
"an",
"event",
"to",
"other",
"applications"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/3DCursor/IODevices/gearwear/PhoneSide/gearinputprovider/src/main/java/com/samsung/mpl/gearinputprovider/backend/InputProviderService.java#L286-L290 |
161,930 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/Jassimp.java | Jassimp.importFile | public static AiScene importFile(String filename) throws IOException {
return importFile(filename, EnumSet.noneOf(AiPostProcessSteps.class));
} | java | public static AiScene importFile(String filename) throws IOException {
return importFile(filename, EnumSet.noneOf(AiPostProcessSteps.class));
} | [
"public",
"static",
"AiScene",
"importFile",
"(",
"String",
"filename",
")",
"throws",
"IOException",
"{",
"return",
"importFile",
"(",
"filename",
",",
"EnumSet",
".",
"noneOf",
"(",
"AiPostProcessSteps",
".",
"class",
")",
")",
";",
"}"
] | Imports a file via assimp without post processing.
@param filename the file to import
@return the loaded scene
@throws IOException if an error occurs | [
"Imports",
"a",
"file",
"via",
"assimp",
"without",
"post",
"processing",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/Jassimp.java#L77-L80 |
161,931 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java | GVRSkeletonAnimation.addChannel | public void addChannel(String boneName, GVRAnimationChannel channel)
{
int boneId = mSkeleton.getBoneIndex(boneName);
if (boneId >= 0)
{
mBoneChannels[boneId] = channel;
mSkeleton.setBoneOptions(boneId, GVRSkeleton.BONE_ANIMATE);
Log.d("BONE", "Adding anim... | java | public void addChannel(String boneName, GVRAnimationChannel channel)
{
int boneId = mSkeleton.getBoneIndex(boneName);
if (boneId >= 0)
{
mBoneChannels[boneId] = channel;
mSkeleton.setBoneOptions(boneId, GVRSkeleton.BONE_ANIMATE);
Log.d("BONE", "Adding anim... | [
"public",
"void",
"addChannel",
"(",
"String",
"boneName",
",",
"GVRAnimationChannel",
"channel",
")",
"{",
"int",
"boneId",
"=",
"mSkeleton",
".",
"getBoneIndex",
"(",
"boneName",
")",
";",
"if",
"(",
"boneId",
">=",
"0",
")",
"{",
"mBoneChannels",
"[",
"... | Add a channel to the animation to animate the named bone.
@param boneName name of bone to animate.
@param channel The animation channel. | [
"Add",
"a",
"channel",
"to",
"the",
"animation",
"to",
"animate",
"the",
"named",
"bone",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java#L105-L114 |
161,932 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java | GVRSkeletonAnimation.findChannel | public GVRAnimationChannel findChannel(String boneName)
{
int boneId = mSkeleton.getBoneIndex(boneName);
if (boneId >= 0)
{
return mBoneChannels[boneId];
}
return null;
} | java | public GVRAnimationChannel findChannel(String boneName)
{
int boneId = mSkeleton.getBoneIndex(boneName);
if (boneId >= 0)
{
return mBoneChannels[boneId];
}
return null;
} | [
"public",
"GVRAnimationChannel",
"findChannel",
"(",
"String",
"boneName",
")",
"{",
"int",
"boneId",
"=",
"mSkeleton",
".",
"getBoneIndex",
"(",
"boneName",
")",
";",
"if",
"(",
"boneId",
">=",
"0",
")",
"{",
"return",
"mBoneChannels",
"[",
"boneId",
"]",
... | Find the channel in the animation that animates the named bone.
@param boneName name of bone to animate. | [
"Find",
"the",
"channel",
"in",
"the",
"animation",
"that",
"animates",
"the",
"named",
"bone",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java#L120-L128 |
161,933 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java | GVRSkeletonAnimation.animate | public void animate(float timeInSec)
{
GVRSkeleton skel = getSkeleton();
GVRPose pose = skel.getPose();
computePose(timeInSec,pose);
skel.poseToBones();
skel.updateBonePose();
skel.updateSkinPose();
} | java | public void animate(float timeInSec)
{
GVRSkeleton skel = getSkeleton();
GVRPose pose = skel.getPose();
computePose(timeInSec,pose);
skel.poseToBones();
skel.updateBonePose();
skel.updateSkinPose();
} | [
"public",
"void",
"animate",
"(",
"float",
"timeInSec",
")",
"{",
"GVRSkeleton",
"skel",
"=",
"getSkeleton",
"(",
")",
";",
"GVRPose",
"pose",
"=",
"skel",
".",
"getPose",
"(",
")",
";",
"computePose",
"(",
"timeInSec",
",",
"pose",
")",
";",
"skel",
"... | Compute pose of skeleton at the given time from the animation channels.
@param timeInSec animation time in seconds. | [
"Compute",
"pose",
"of",
"skeleton",
"at",
"the",
"given",
"time",
"from",
"the",
"animation",
"channels",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java#L218-L226 |
161,934 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/ResourceCache.java | ResourceCache.put | public void put(GVRAndroidResource androidResource, T resource) {
Log.d(TAG, "put resource %s to cache", androidResource);
super.put(androidResource, resource);
} | java | public void put(GVRAndroidResource androidResource, T resource) {
Log.d(TAG, "put resource %s to cache", androidResource);
super.put(androidResource, resource);
} | [
"public",
"void",
"put",
"(",
"GVRAndroidResource",
"androidResource",
",",
"T",
"resource",
")",
"{",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"put resource %s to cache\"",
",",
"androidResource",
")",
";",
"super",
".",
"put",
"(",
"androidResource",
",",
"resour... | Save a weak reference to the resource | [
"Save",
"a",
"weak",
"reference",
"to",
"the",
"resource"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/ResourceCache.java#L43-L47 |
161,935 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java | ControlBar.removeControl | public void removeControl(String name) {
Widget control = findChildByName(name);
if (control != null) {
removeChild(control);
if (mBgResId != -1) {
updateMesh();
}
}
} | java | public void removeControl(String name) {
Widget control = findChildByName(name);
if (control != null) {
removeChild(control);
if (mBgResId != -1) {
updateMesh();
}
}
} | [
"public",
"void",
"removeControl",
"(",
"String",
"name",
")",
"{",
"Widget",
"control",
"=",
"findChildByName",
"(",
"name",
")",
";",
"if",
"(",
"control",
"!=",
"null",
")",
"{",
"removeChild",
"(",
"control",
")",
";",
"if",
"(",
"mBgResId",
"!=",
... | Remove control from the control bar. Size of control bar is updated based on new number of
controls.
@param name name of the control to remove | [
"Remove",
"control",
"from",
"the",
"control",
"bar",
".",
"Size",
"of",
"control",
"bar",
"is",
"updated",
"based",
"on",
"new",
"number",
"of",
"controls",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java#L135-L143 |
161,936 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java | ControlBar.addControl | public void addControl(String name, JSONObject properties, Widget.OnTouchListener listener) {
final JSONObject allowedProperties = new JSONObject();
put(allowedProperties, Widget.Properties.name, optString(properties, Widget.Properties.name));
put(allowedProperties, Widget.Properties.size, new P... | java | public void addControl(String name, JSONObject properties, Widget.OnTouchListener listener) {
final JSONObject allowedProperties = new JSONObject();
put(allowedProperties, Widget.Properties.name, optString(properties, Widget.Properties.name));
put(allowedProperties, Widget.Properties.size, new P... | [
"public",
"void",
"addControl",
"(",
"String",
"name",
",",
"JSONObject",
"properties",
",",
"Widget",
".",
"OnTouchListener",
"listener",
")",
"{",
"final",
"JSONObject",
"allowedProperties",
"=",
"new",
"JSONObject",
"(",
")",
";",
"put",
"(",
"allowedProperti... | Add new control at the end of control bar with specified touch listener.
Size of control bar is updated based on new number of controls.
@param name name of the control to remove
@param properties JSON control specific properties
@param listener touch listener | [
"Add",
"new",
"control",
"at",
"the",
"end",
"of",
"control",
"bar",
"with",
"specified",
"touch",
"listener",
".",
"Size",
"of",
"control",
"bar",
"is",
"updated",
"based",
"on",
"new",
"number",
"of",
"controls",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java#L153-L161 |
161,937 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java | ControlBar.addControl | public Widget addControl(String name, int resId, Widget.OnTouchListener listener) {
return addControl(name, resId, null, listener, -1);
} | java | public Widget addControl(String name, int resId, Widget.OnTouchListener listener) {
return addControl(name, resId, null, listener, -1);
} | [
"public",
"Widget",
"addControl",
"(",
"String",
"name",
",",
"int",
"resId",
",",
"Widget",
".",
"OnTouchListener",
"listener",
")",
"{",
"return",
"addControl",
"(",
"name",
",",
"resId",
",",
"null",
",",
"listener",
",",
"-",
"1",
")",
";",
"}"
] | Add new control at the end of control bar with specified touch listener and resource.
Size of control bar is updated based on new number of controls.
@param name name of the control to remove
@param resId the control face
@param listener touch listener | [
"Add",
"new",
"control",
"at",
"the",
"end",
"of",
"control",
"bar",
"with",
"specified",
"touch",
"listener",
"and",
"resource",
".",
"Size",
"of",
"control",
"bar",
"is",
"updated",
"based",
"on",
"new",
"number",
"of",
"controls",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java#L170-L172 |
161,938 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java | ControlBar.addControl | public Widget addControl(String name, int resId, String label, Widget.OnTouchListener listener) {
return addControl(name, resId, label, listener, -1);
} | java | public Widget addControl(String name, int resId, String label, Widget.OnTouchListener listener) {
return addControl(name, resId, label, listener, -1);
} | [
"public",
"Widget",
"addControl",
"(",
"String",
"name",
",",
"int",
"resId",
",",
"String",
"label",
",",
"Widget",
".",
"OnTouchListener",
"listener",
")",
"{",
"return",
"addControl",
"(",
"name",
",",
"resId",
",",
"label",
",",
"listener",
",",
"-",
... | Add new control at the end of control bar with specified touch listener, control label and resource.
Size of control bar is updated based on new number of controls.
@param name name of the control to remove
@param resId the control face
@param label the control label
@param listener touch listener | [
"Add",
"new",
"control",
"at",
"the",
"end",
"of",
"control",
"bar",
"with",
"specified",
"touch",
"listener",
"control",
"label",
"and",
"resource",
".",
"Size",
"of",
"control",
"bar",
"is",
"updated",
"based",
"on",
"new",
"number",
"of",
"controls",
".... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java#L182-L184 |
161,939 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java | ControlBar.addControl | public Widget addControl(String name, int resId, Widget.OnTouchListener listener, int position) {
Widget control = findChildByName(name);
if (control == null) {
control = createControlWidget(resId, name, null);
}
setupControl(name, control, listener, position);
return... | java | public Widget addControl(String name, int resId, Widget.OnTouchListener listener, int position) {
Widget control = findChildByName(name);
if (control == null) {
control = createControlWidget(resId, name, null);
}
setupControl(name, control, listener, position);
return... | [
"public",
"Widget",
"addControl",
"(",
"String",
"name",
",",
"int",
"resId",
",",
"Widget",
".",
"OnTouchListener",
"listener",
",",
"int",
"position",
")",
"{",
"Widget",
"control",
"=",
"findChildByName",
"(",
"name",
")",
";",
"if",
"(",
"control",
"==... | Add new control at the control bar with specified touch listener, resource and position.
Size of control bar is updated based on new number of controls.
@param name name of the control to remove
@param resId the control face
@param listener touch listener
@param position control position in the bar | [
"Add",
"new",
"control",
"at",
"the",
"control",
"bar",
"with",
"specified",
"touch",
"listener",
"resource",
"and",
"position",
".",
"Size",
"of",
"control",
"bar",
"is",
"updated",
"based",
"on",
"new",
"number",
"of",
"controls",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java#L194-L201 |
161,940 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMeshCollider.java | GVRMeshCollider.setMesh | public void setMesh(GVRMesh mesh) {
mMesh = mesh;
NativeMeshCollider.setMesh(getNative(), mesh.getNative());
} | java | public void setMesh(GVRMesh mesh) {
mMesh = mesh;
NativeMeshCollider.setMesh(getNative(), mesh.getNative());
} | [
"public",
"void",
"setMesh",
"(",
"GVRMesh",
"mesh",
")",
"{",
"mMesh",
"=",
"mesh",
";",
"NativeMeshCollider",
".",
"setMesh",
"(",
"getNative",
"(",
")",
",",
"mesh",
".",
"getNative",
"(",
")",
")",
";",
"}"
] | Set the mesh to be tested against.
@param mesh
The {@link GVRMesh} that the picking ray will test against. | [
"Set",
"the",
"mesh",
"to",
"be",
"tested",
"against",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMeshCollider.java#L123-L126 |
161,941 | Samsung/GearVRf | GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java | GVRGenericConstraint.setLinearLowerLimits | public void setLinearLowerLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setLinearLowerLimits(getNative(), limitX, limitY, limitZ);
} | java | public void setLinearLowerLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setLinearLowerLimits(getNative(), limitX, limitY, limitZ);
} | [
"public",
"void",
"setLinearLowerLimits",
"(",
"float",
"limitX",
",",
"float",
"limitY",
",",
"float",
"limitZ",
")",
"{",
"Native3DGenericConstraint",
".",
"setLinearLowerLimits",
"(",
"getNative",
"(",
")",
",",
"limitX",
",",
"limitY",
",",
"limitZ",
")",
... | Sets the lower limits for the "moving" body translation relative to joint point.
@param limitX the X axis lower translation limit
@param limitY the Y axis lower translation limit
@param limitZ the Z axis lower translation limit | [
"Sets",
"the",
"lower",
"limits",
"for",
"the",
"moving",
"body",
"translation",
"relative",
"to",
"joint",
"point",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L65-L67 |
161,942 | Samsung/GearVRf | GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java | GVRGenericConstraint.setLinearUpperLimits | public void setLinearUpperLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setLinearUpperLimits(getNative(), limitX, limitY, limitZ);
} | java | public void setLinearUpperLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setLinearUpperLimits(getNative(), limitX, limitY, limitZ);
} | [
"public",
"void",
"setLinearUpperLimits",
"(",
"float",
"limitX",
",",
"float",
"limitY",
",",
"float",
"limitZ",
")",
"{",
"Native3DGenericConstraint",
".",
"setLinearUpperLimits",
"(",
"getNative",
"(",
")",
",",
"limitX",
",",
"limitY",
",",
"limitZ",
")",
... | Sets the upper limits for the "moving" body translation relative to joint point.
@param limitX the X upper lower translation limit
@param limitY the Y upper lower translation limit
@param limitZ the Z upper lower translation limit | [
"Sets",
"the",
"upper",
"limits",
"for",
"the",
"moving",
"body",
"translation",
"relative",
"to",
"joint",
"point",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L85-L87 |
161,943 | Samsung/GearVRf | GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java | GVRGenericConstraint.setAngularLowerLimits | public void setAngularLowerLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setAngularLowerLimits(getNative(), limitX, limitY, limitZ);
} | java | public void setAngularLowerLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setAngularLowerLimits(getNative(), limitX, limitY, limitZ);
} | [
"public",
"void",
"setAngularLowerLimits",
"(",
"float",
"limitX",
",",
"float",
"limitY",
",",
"float",
"limitZ",
")",
"{",
"Native3DGenericConstraint",
".",
"setAngularLowerLimits",
"(",
"getNative",
"(",
")",
",",
"limitX",
",",
"limitY",
",",
"limitZ",
")",
... | Sets the lower limits for the "moving" body rotation relative to joint point.
@param limitX the X axis lower rotation limit (in radians)
@param limitY the Y axis lower rotation limit (in radians)
@param limitZ the Z axis lower rotation limit (in radians) | [
"Sets",
"the",
"lower",
"limits",
"for",
"the",
"moving",
"body",
"rotation",
"relative",
"to",
"joint",
"point",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L105-L107 |
161,944 | Samsung/GearVRf | GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java | GVRGenericConstraint.setAngularUpperLimits | public void setAngularUpperLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setAngularUpperLimits(getNative(), limitX, limitY, limitZ);
} | java | public void setAngularUpperLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setAngularUpperLimits(getNative(), limitX, limitY, limitZ);
} | [
"public",
"void",
"setAngularUpperLimits",
"(",
"float",
"limitX",
",",
"float",
"limitY",
",",
"float",
"limitZ",
")",
"{",
"Native3DGenericConstraint",
".",
"setAngularUpperLimits",
"(",
"getNative",
"(",
")",
",",
"limitX",
",",
"limitY",
",",
"limitZ",
")",
... | Sets the upper limits for the "moving" body rotation relative to joint point.
@param limitX the X axis upper rotation limit (in radians)
@param limitY the Y axis upper rotation limit (in radians)
@param limitZ the Z axis upper rotation limit (in radians) | [
"Sets",
"the",
"upper",
"limits",
"for",
"the",
"moving",
"body",
"rotation",
"relative",
"to",
"joint",
"point",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L125-L127 |
161,945 | Samsung/GearVRf | GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/Particles.java | Particles.makeParticleMesh | GVRSceneObject makeParticleMesh(float[] vertices, float[] velocities,
float[] particleTimeStamps )
{
mParticleMesh = new GVRMesh(mGVRContext);
//pass the particle positions as vertices, velocities as normals, and
//spawning times as texture coordin... | java | GVRSceneObject makeParticleMesh(float[] vertices, float[] velocities,
float[] particleTimeStamps )
{
mParticleMesh = new GVRMesh(mGVRContext);
//pass the particle positions as vertices, velocities as normals, and
//spawning times as texture coordin... | [
"GVRSceneObject",
"makeParticleMesh",
"(",
"float",
"[",
"]",
"vertices",
",",
"float",
"[",
"]",
"velocities",
",",
"float",
"[",
"]",
"particleTimeStamps",
")",
"{",
"mParticleMesh",
"=",
"new",
"GVRMesh",
"(",
"mGVRContext",
")",
";",
"//pass the particle pos... | Creates and returns a GVRSceneObject with the specified mesh attributes.
@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)
@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)
@param particleTimeStamps the spawning times of each vertex.... | [
"Creates",
"and",
"returns",
"a",
"GVRSceneObject",
"with",
"the",
"specified",
"mesh",
"attributes",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/Particles.java#L79-L123 |
161,946 | Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java | GVRScriptBehavior.setFilePath | public void setFilePath(String filePath) throws IOException, GVRScriptException
{
GVRResourceVolume.VolumeType volumeType = GVRResourceVolume.VolumeType.ANDROID_ASSETS;
String fname = filePath.toLowerCase();
mLanguage = FileNameUtils.getExtension(fname);
if (fname.st... | java | public void setFilePath(String filePath) throws IOException, GVRScriptException
{
GVRResourceVolume.VolumeType volumeType = GVRResourceVolume.VolumeType.ANDROID_ASSETS;
String fname = filePath.toLowerCase();
mLanguage = FileNameUtils.getExtension(fname);
if (fname.st... | [
"public",
"void",
"setFilePath",
"(",
"String",
"filePath",
")",
"throws",
"IOException",
",",
"GVRScriptException",
"{",
"GVRResourceVolume",
".",
"VolumeType",
"volumeType",
"=",
"GVRResourceVolume",
".",
"VolumeType",
".",
"ANDROID_ASSETS",
";",
"String",
"fname",
... | Sets the path to the script file to load and loads the script.
@param filePath path to script file
@throws IOException if the script cannot be read.
@throws GVRScriptException if a script processing error occurs. | [
"Sets",
"the",
"path",
"to",
"the",
"script",
"file",
"to",
"load",
"and",
"loads",
"the",
"script",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java#L100-L119 |
161,947 | Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java | GVRScriptBehavior.setScriptText | public void setScriptText(String scriptText, String language)
{
GVRScriptFile newScript = new GVRJavascriptScriptFile(getGVRContext(), scriptText);
mLanguage = GVRScriptManager.LANG_JAVASCRIPT;
setScriptFile(newScript);
} | java | public void setScriptText(String scriptText, String language)
{
GVRScriptFile newScript = new GVRJavascriptScriptFile(getGVRContext(), scriptText);
mLanguage = GVRScriptManager.LANG_JAVASCRIPT;
setScriptFile(newScript);
} | [
"public",
"void",
"setScriptText",
"(",
"String",
"scriptText",
",",
"String",
"language",
")",
"{",
"GVRScriptFile",
"newScript",
"=",
"new",
"GVRJavascriptScriptFile",
"(",
"getGVRContext",
"(",
")",
",",
"scriptText",
")",
";",
"mLanguage",
"=",
"GVRScriptManag... | Loads the script from a text string.
@param scriptText text string containing script to execute.
@param language language ("js" or "lua") | [
"Loads",
"the",
"script",
"from",
"a",
"text",
"string",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java#L126-L131 |
161,948 | Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java | GVRScriptBehavior.invokeFunction | public boolean invokeFunction(String funcName, Object[] args)
{
mLastError = null;
if (mScriptFile != null)
{
if (mScriptFile.invokeFunction(funcName, args))
{
return true;
}
}
mLastError = mScriptFile.getLastError();
... | java | public boolean invokeFunction(String funcName, Object[] args)
{
mLastError = null;
if (mScriptFile != null)
{
if (mScriptFile.invokeFunction(funcName, args))
{
return true;
}
}
mLastError = mScriptFile.getLastError();
... | [
"public",
"boolean",
"invokeFunction",
"(",
"String",
"funcName",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"mLastError",
"=",
"null",
";",
"if",
"(",
"mScriptFile",
"!=",
"null",
")",
"{",
"if",
"(",
"mScriptFile",
".",
"invokeFunction",
"(",
"funcName",... | Calls a function script associated with this component.
The function is called even if the component
is not enabled and not attached to a scene object.
@param funcName name of script function to call.
@param args function parameters as an array of objects.
@return true if function was called, false if no such function
... | [
"Calls",
"a",
"function",
"script",
"associated",
"with",
"this",
"component",
".",
"The",
"function",
"is",
"called",
"even",
"if",
"the",
"component",
"is",
"not",
"enabled",
"and",
"not",
"attached",
"to",
"a",
"scene",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java#L316-L332 |
161,949 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRViewSceneObject.java | GVRViewSceneObject.setTextureBufferSize | public void setTextureBufferSize(final int size) {
mRootViewGroup.post(new Runnable() {
@Override
public void run() {
mRootViewGroup.setTextureBufferSize(size);
}
});
} | java | public void setTextureBufferSize(final int size) {
mRootViewGroup.post(new Runnable() {
@Override
public void run() {
mRootViewGroup.setTextureBufferSize(size);
}
});
} | [
"public",
"void",
"setTextureBufferSize",
"(",
"final",
"int",
"size",
")",
"{",
"mRootViewGroup",
".",
"post",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"mRootViewGroup",
".",
"setTextureBufferSize",
"("... | Set the default size of the texture buffers. You can call this to reduce the buffer size
of views with anti-aliasing issue.
The max value to the buffer size should be the Math.max(width, height) of attached view.
@param size buffer size. Value > 0 and <= Math.max(width, height). | [
"Set",
"the",
"default",
"size",
"of",
"the",
"texture",
"buffers",
".",
"You",
"can",
"call",
"this",
"to",
"reduce",
"the",
"buffer",
"size",
"of",
"views",
"with",
"anti",
"-",
"aliasing",
"issue",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRViewSceneObject.java#L361-L368 |
161,950 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCamera.java | GVRCamera.setBackgroundColor | public void setBackgroundColor(int color) {
setBackgroundColorR(Colors.byteToGl(Color.red(color)));
setBackgroundColorG(Colors.byteToGl(Color.green(color)));
setBackgroundColorB(Colors.byteToGl(Color.blue(color)));
setBackgroundColorA(Colors.byteToGl(Color.alpha(color)));
} | java | public void setBackgroundColor(int color) {
setBackgroundColorR(Colors.byteToGl(Color.red(color)));
setBackgroundColorG(Colors.byteToGl(Color.green(color)));
setBackgroundColorB(Colors.byteToGl(Color.blue(color)));
setBackgroundColorA(Colors.byteToGl(Color.alpha(color)));
} | [
"public",
"void",
"setBackgroundColor",
"(",
"int",
"color",
")",
"{",
"setBackgroundColorR",
"(",
"Colors",
".",
"byteToGl",
"(",
"Color",
".",
"red",
"(",
"color",
")",
")",
")",
";",
"setBackgroundColorG",
"(",
"Colors",
".",
"byteToGl",
"(",
"Color",
"... | Set the background color.
If you don't set the background color, the default is an opaque black:
{@link Color#BLACK}, 0xff000000.
@param color
An Android 32-bit (ARGB) {@link Color}, such as you get from
{@link Resources#getColor(int)} | [
"Set",
"the",
"background",
"color",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCamera.java#L83-L88 |
161,951 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCamera.java | GVRCamera.setBackgroundColor | public void setBackgroundColor(float r, float g, float b, float a) {
setBackgroundColorR(r);
setBackgroundColorG(g);
setBackgroundColorB(b);
setBackgroundColorA(a);
} | java | public void setBackgroundColor(float r, float g, float b, float a) {
setBackgroundColorR(r);
setBackgroundColorG(g);
setBackgroundColorB(b);
setBackgroundColorA(a);
} | [
"public",
"void",
"setBackgroundColor",
"(",
"float",
"r",
",",
"float",
"g",
",",
"float",
"b",
",",
"float",
"a",
")",
"{",
"setBackgroundColorR",
"(",
"r",
")",
";",
"setBackgroundColorG",
"(",
"g",
")",
";",
"setBackgroundColorB",
"(",
"b",
")",
";",... | Sets the background color of the scene rendered by this camera.
If you don't set the background color, the default is an opaque black.
Meaningful parameter values are from 0 to 1, inclusive: values
{@literal < 0} are clamped to 0; values {@literal > 1} are clamped to 1. | [
"Sets",
"the",
"background",
"color",
"of",
"the",
"scene",
"rendered",
"by",
"this",
"camera",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCamera.java#L97-L102 |
161,952 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCamera.java | GVRCamera.addPostEffect | public void addPostEffect(GVRMaterial postEffectData) {
GVRContext ctx = getGVRContext();
if (mPostEffects == null)
{
mPostEffects = new GVRRenderData(ctx, postEffectData);
GVRMesh dummyMesh = new GVRMesh(getGVRContext(),"float3 a_position float2 a_texcoord");
... | java | public void addPostEffect(GVRMaterial postEffectData) {
GVRContext ctx = getGVRContext();
if (mPostEffects == null)
{
mPostEffects = new GVRRenderData(ctx, postEffectData);
GVRMesh dummyMesh = new GVRMesh(getGVRContext(),"float3 a_position float2 a_texcoord");
... | [
"public",
"void",
"addPostEffect",
"(",
"GVRMaterial",
"postEffectData",
")",
"{",
"GVRContext",
"ctx",
"=",
"getGVRContext",
"(",
")",
";",
"if",
"(",
"mPostEffects",
"==",
"null",
")",
"{",
"mPostEffects",
"=",
"new",
"GVRRenderData",
"(",
"ctx",
",",
"pos... | Add a post-effect to this camera's render chain.
Post-effects are GL shaders, applied to the texture (hardware bitmap)
containing the rendered scene graph. Each post-effect combines a shader
selector with a set of parameters: This lets you pass different
parameters to the shaders for each eye.
@param postEffectData
P... | [
"Add",
"a",
"post",
"-",
"effect",
"to",
"this",
"camera",
"s",
"render",
"chain",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCamera.java#L214-L231 |
161,953 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java | GVRSkeleton.getBoneIndex | public int getBoneIndex(GVRSceneObject bone)
{
for (int i = 0; i < getNumBones(); ++i)
if (mBones[i] == bone)
return i;
return -1;
} | java | public int getBoneIndex(GVRSceneObject bone)
{
for (int i = 0; i < getNumBones(); ++i)
if (mBones[i] == bone)
return i;
return -1;
} | [
"public",
"int",
"getBoneIndex",
"(",
"GVRSceneObject",
"bone",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getNumBones",
"(",
")",
";",
"++",
"i",
")",
"if",
"(",
"mBones",
"[",
"i",
"]",
"==",
"bone",
")",
"return",
"i",
";",
... | Get the bone index for the given scene object.
@param bone GVRSceneObject bone to search for
@return bone index or -1 for root bone.
@see #getParentBoneIndex | [
"Get",
"the",
"bone",
"index",
"for",
"the",
"given",
"scene",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java#L714-L720 |
161,954 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java | GVRSkeleton.getBoneIndex | public int getBoneIndex(String bonename)
{
for (int i = 0; i < getNumBones(); ++i)
if (mBoneNames[i].equals(bonename))
return i;
return -1;
} | java | public int getBoneIndex(String bonename)
{
for (int i = 0; i < getNumBones(); ++i)
if (mBoneNames[i].equals(bonename))
return i;
return -1;
} | [
"public",
"int",
"getBoneIndex",
"(",
"String",
"bonename",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getNumBones",
"(",
")",
";",
"++",
"i",
")",
"if",
"(",
"mBoneNames",
"[",
"i",
"]",
".",
"equals",
"(",
"bonename",
")",
")",... | Get the bone index for the bone with the given name.
@param bonename string identifying the bone whose index you want
@return 0 based bone index or -1 if bone with that name is not found. | [
"Get",
"the",
"bone",
"index",
"for",
"the",
"bone",
"with",
"the",
"given",
"name",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java#L728-L735 |
161,955 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java | GVRSkeleton.setBoneName | public void setBoneName(int boneindex, String bonename)
{
mBoneNames[boneindex] = bonename;
NativeSkeleton.setBoneName(getNative(), boneindex, bonename);
} | java | public void setBoneName(int boneindex, String bonename)
{
mBoneNames[boneindex] = bonename;
NativeSkeleton.setBoneName(getNative(), boneindex, bonename);
} | [
"public",
"void",
"setBoneName",
"(",
"int",
"boneindex",
",",
"String",
"bonename",
")",
"{",
"mBoneNames",
"[",
"boneindex",
"]",
"=",
"bonename",
";",
"NativeSkeleton",
".",
"setBoneName",
"(",
"getNative",
"(",
")",
",",
"boneindex",
",",
"bonename",
")"... | Sets the name of the designated bone.
@param boneindex zero based index of bone to rotate.
@param bonename string with name of bone.
. * @see #getBoneName | [
"Sets",
"the",
"name",
"of",
"the",
"designated",
"bone",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java#L776-L780 |
161,956 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java | GVRSkeleton.poseFromBones | public void poseFromBones()
{
for (int i = 0; i < getNumBones(); ++i)
{
GVRSceneObject bone = mBones[i];
if (bone == null)
{
continue;
}
if ((mBoneOptions[i] & BONE_LOCK_ROTATION) != 0)
{
continue... | java | public void poseFromBones()
{
for (int i = 0; i < getNumBones(); ++i)
{
GVRSceneObject bone = mBones[i];
if (bone == null)
{
continue;
}
if ((mBoneOptions[i] & BONE_LOCK_ROTATION) != 0)
{
continue... | [
"public",
"void",
"poseFromBones",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getNumBones",
"(",
")",
";",
"++",
"i",
")",
"{",
"GVRSceneObject",
"bone",
"=",
"mBones",
"[",
"i",
"]",
";",
"if",
"(",
"bone",
"==",
"null",
... | Applies the matrices computed from the scene object's
linked to the skeleton bones to the current pose.
@see #applyPose(GVRPose, int)
@see #setPose(GVRPose) | [
"Applies",
"the",
"matrices",
"computed",
"from",
"the",
"scene",
"object",
"s",
"linked",
"to",
"the",
"skeleton",
"bones",
"to",
"the",
"current",
"pose",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java#L948-L966 |
161,957 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java | GVRSkeleton.merge | public void merge(GVRSkeleton newSkel)
{
int numBones = getNumBones();
List<Integer> parentBoneIds = new ArrayList<Integer>(numBones + newSkel.getNumBones());
List<String> newBoneNames = new ArrayList<String>(newSkel.getNumBones());
List<Matrix4f> newMatrices = new ArrayList<Matrix4f... | java | public void merge(GVRSkeleton newSkel)
{
int numBones = getNumBones();
List<Integer> parentBoneIds = new ArrayList<Integer>(numBones + newSkel.getNumBones());
List<String> newBoneNames = new ArrayList<String>(newSkel.getNumBones());
List<Matrix4f> newMatrices = new ArrayList<Matrix4f... | [
"public",
"void",
"merge",
"(",
"GVRSkeleton",
"newSkel",
")",
"{",
"int",
"numBones",
"=",
"getNumBones",
"(",
")",
";",
"List",
"<",
"Integer",
">",
"parentBoneIds",
"=",
"new",
"ArrayList",
"<",
"Integer",
">",
"(",
"numBones",
"+",
"newSkel",
".",
"g... | Merge the source skeleton with this one.
The result will be that this skeleton has all of its
original bones and all the bones in the new skeleton.
@param newSkel skeleton to merge with this one | [
"Merge",
"the",
"source",
"skeleton",
"with",
"this",
"one",
".",
"The",
"result",
"will",
"be",
"that",
"this",
"skeleton",
"has",
"all",
"of",
"its",
"original",
"bones",
"and",
"all",
"the",
"bones",
"in",
"the",
"new",
"skeleton",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRSkeleton.java#L1105-L1172 |
161,958 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRApplication.java | GVRApplication.getFullScreenView | public View getFullScreenView() {
if (mFullScreenView != null) {
return mFullScreenView;
}
final DisplayMetrics metrics = new DisplayMetrics();
mActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
final int screenWidthPixels = Math.max(metrics.widthP... | java | public View getFullScreenView() {
if (mFullScreenView != null) {
return mFullScreenView;
}
final DisplayMetrics metrics = new DisplayMetrics();
mActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
final int screenWidthPixels = Math.max(metrics.widthP... | [
"public",
"View",
"getFullScreenView",
"(",
")",
"{",
"if",
"(",
"mFullScreenView",
"!=",
"null",
")",
"{",
"return",
"mFullScreenView",
";",
"}",
"final",
"DisplayMetrics",
"metrics",
"=",
"new",
"DisplayMetrics",
"(",
")",
";",
"mActivity",
".",
"getWindowMa... | Invalidating just the GVRView associated with the GVRViewSceneObject
incorrectly set the clip rectangle to just that view. To fix this,
we have to create a full screen android View and invalidate this
to restore the clip rectangle.
@return full screen View object | [
"Invalidating",
"just",
"the",
"GVRView",
"associated",
"with",
"the",
"GVRViewSceneObject",
"incorrectly",
"set",
"the",
"clip",
"rectangle",
"to",
"just",
"that",
"view",
".",
"To",
"fix",
"this",
"we",
"have",
"to",
"create",
"a",
"full",
"screen",
"android... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRApplication.java#L297-L313 |
161,959 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRApplication.java | GVRApplication.unregisterView | public final void unregisterView(final View view) {
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (null != mRenderableViewGroup && view.getParent() == mRenderableViewGroup) {
mRenderableViewGroup.removeView(view);
... | java | public final void unregisterView(final View view) {
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (null != mRenderableViewGroup && view.getParent() == mRenderableViewGroup) {
mRenderableViewGroup.removeView(view);
... | [
"public",
"final",
"void",
"unregisterView",
"(",
"final",
"View",
"view",
")",
"{",
"mActivity",
".",
"runOnUiThread",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"mRenderableV... | Remove a child view of Android hierarchy view .
@param view View to be removed. | [
"Remove",
"a",
"child",
"view",
"of",
"Android",
"hierarchy",
"view",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRApplication.java#L556-L565 |
161,960 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/GroupWidget.java | GroupWidget.clear | public void clear() {
List<Widget> children = getChildren();
Log.d(TAG, "clear(%s): removing %d children", getName(), children.size());
for (Widget child : children) {
removeChild(child, true);
}
requestLayout();
} | java | public void clear() {
List<Widget> children = getChildren();
Log.d(TAG, "clear(%s): removing %d children", getName(), children.size());
for (Widget child : children) {
removeChild(child, true);
}
requestLayout();
} | [
"public",
"void",
"clear",
"(",
")",
"{",
"List",
"<",
"Widget",
">",
"children",
"=",
"getChildren",
"(",
")",
";",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"clear(%s): removing %d children\"",
",",
"getName",
"(",
")",
",",
"children",
".",
"size",
"(",
"... | Removes all children | [
"Removes",
"all",
"children"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/GroupWidget.java#L241-L248 |
161,961 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/GroupWidget.java | GroupWidget.inViewPort | protected boolean inViewPort(final int dataIndex) {
boolean inViewPort = true;
for (Layout layout: mLayouts) {
inViewPort = inViewPort && (layout.inViewPort(dataIndex) || !layout.isClippingEnabled());
}
return inViewPort;
} | java | protected boolean inViewPort(final int dataIndex) {
boolean inViewPort = true;
for (Layout layout: mLayouts) {
inViewPort = inViewPort && (layout.inViewPort(dataIndex) || !layout.isClippingEnabled());
}
return inViewPort;
} | [
"protected",
"boolean",
"inViewPort",
"(",
"final",
"int",
"dataIndex",
")",
"{",
"boolean",
"inViewPort",
"=",
"true",
";",
"for",
"(",
"Layout",
"layout",
":",
"mLayouts",
")",
"{",
"inViewPort",
"=",
"inViewPort",
"&&",
"(",
"layout",
".",
"inViewPort",
... | Checks if the child is currently in ViewPort
@param dataIndex child index
@return true if the child is in viewport, false - otherwise | [
"Checks",
"if",
"the",
"child",
"is",
"currently",
"in",
"ViewPort"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/GroupWidget.java#L255-L262 |
161,962 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCompressedImage.java | GVRCompressedImage.setDataOffsets | public void setDataOffsets(int[] offsets)
{
assert(mLevels == offsets.length);
NativeBitmapImage.updateCompressed(getNative(), mWidth, mHeight, mImageSize, mData, mLevels, offsets);
mData = null;
} | java | public void setDataOffsets(int[] offsets)
{
assert(mLevels == offsets.length);
NativeBitmapImage.updateCompressed(getNative(), mWidth, mHeight, mImageSize, mData, mLevels, offsets);
mData = null;
} | [
"public",
"void",
"setDataOffsets",
"(",
"int",
"[",
"]",
"offsets",
")",
"{",
"assert",
"(",
"mLevels",
"==",
"offsets",
".",
"length",
")",
";",
"NativeBitmapImage",
".",
"updateCompressed",
"(",
"getNative",
"(",
")",
",",
"mWidth",
",",
"mHeight",
",",... | Set the offsets in the compressed data area for each mip-map level.
@param offsets array of offsets | [
"Set",
"the",
"offsets",
"in",
"the",
"compressed",
"data",
"area",
"for",
"each",
"mip",
"-",
"map",
"level",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCompressedImage.java#L74-L79 |
161,963 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/FileNameUtils.java | FileNameUtils.getFilename | public static String getFilename(String path) throws IllegalArgumentException {
if (Pattern.matches(sPatternUrl, path))
return getURLFilename(path);
return new File(path).getName();
} | java | public static String getFilename(String path) throws IllegalArgumentException {
if (Pattern.matches(sPatternUrl, path))
return getURLFilename(path);
return new File(path).getName();
} | [
"public",
"static",
"String",
"getFilename",
"(",
"String",
"path",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"Pattern",
".",
"matches",
"(",
"sPatternUrl",
",",
"path",
")",
")",
"return",
"getURLFilename",
"(",
"path",
")",
";",
"return",
... | Gets the filename from a path or URL.
@param path or url.
@return the file name. | [
"Gets",
"the",
"filename",
"from",
"a",
"path",
"or",
"URL",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/FileNameUtils.java#L65-L70 |
161,964 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/FileNameUtils.java | FileNameUtils.getParentDirectory | public static String getParentDirectory(String filePath) throws IllegalArgumentException {
if (Pattern.matches(sPatternUrl, filePath))
return getURLParentDirectory(filePath);
return new File(filePath).getParent();
} | java | public static String getParentDirectory(String filePath) throws IllegalArgumentException {
if (Pattern.matches(sPatternUrl, filePath))
return getURLParentDirectory(filePath);
return new File(filePath).getParent();
} | [
"public",
"static",
"String",
"getParentDirectory",
"(",
"String",
"filePath",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"Pattern",
".",
"matches",
"(",
"sPatternUrl",
",",
"filePath",
")",
")",
"return",
"getURLParentDirectory",
"(",
"filePath",
... | Returns the directory of the file.
@param filePath Path of the file.
@return The directory string or {@code null} if
there is no parent directory.
@throws IllegalArgumentException if path is bad | [
"Returns",
"the",
"directory",
"of",
"the",
"file",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/FileNameUtils.java#L91-L96 |
161,965 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/FileNameUtils.java | FileNameUtils.getURLParentDirectory | public static String getURLParentDirectory(String urlString) throws IllegalArgumentException {
URL url = null;
try {
url = new URL(urlString);
} catch (MalformedURLException e) {
throw Exceptions.IllegalArgument("Malformed URL: %s", url);
}
String path = ... | java | public static String getURLParentDirectory(String urlString) throws IllegalArgumentException {
URL url = null;
try {
url = new URL(urlString);
} catch (MalformedURLException e) {
throw Exceptions.IllegalArgument("Malformed URL: %s", url);
}
String path = ... | [
"public",
"static",
"String",
"getURLParentDirectory",
"(",
"String",
"urlString",
")",
"throws",
"IllegalArgumentException",
"{",
"URL",
"url",
"=",
"null",
";",
"try",
"{",
"url",
"=",
"new",
"URL",
"(",
"urlString",
")",
";",
"}",
"catch",
"(",
"Malformed... | Returns the directory of the URL.
@param urlString URL of the file.
@return The directory string.
@throws IllegalArgumentException if URL is malformed | [
"Returns",
"the",
"directory",
"of",
"the",
"URL",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/FileNameUtils.java#L105-L121 |
161,966 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/xtext/XtextLinker.java | XtextLinker.clearReference | @Override
protected void clearReference(EObject obj, EReference ref) {
super.clearReference(obj, ref);
if (obj.eIsSet(ref) && ref.getEType().equals(XtextPackage.Literals.TYPE_REF)) {
INode node = NodeModelUtils.getNode((EObject) obj.eGet(ref));
if (node == null)
obj.eUnset(ref);
}
if (obj.eIsSet(ref)... | java | @Override
protected void clearReference(EObject obj, EReference ref) {
super.clearReference(obj, ref);
if (obj.eIsSet(ref) && ref.getEType().equals(XtextPackage.Literals.TYPE_REF)) {
INode node = NodeModelUtils.getNode((EObject) obj.eGet(ref));
if (node == null)
obj.eUnset(ref);
}
if (obj.eIsSet(ref)... | [
"@",
"Override",
"protected",
"void",
"clearReference",
"(",
"EObject",
"obj",
",",
"EReference",
"ref",
")",
"{",
"super",
".",
"clearReference",
"(",
"obj",
",",
"ref",
")",
";",
"if",
"(",
"obj",
".",
"eIsSet",
"(",
"ref",
")",
"&&",
"ref",
".",
"... | We add typeRefs without Nodes on the fly, so we should remove them before relinking. | [
"We",
"add",
"typeRefs",
"without",
"Nodes",
"on",
"the",
"fly",
"so",
"we",
"should",
"remove",
"them",
"before",
"relinking",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/xtext/XtextLinker.java#L466-L482 |
161,967 | eclipse/xtext-core | org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/OutdatedStateManager.java | OutdatedStateManager.newCancelIndicator | public CancelIndicator newCancelIndicator(final ResourceSet rs) {
CancelIndicator _xifexpression = null;
if ((rs instanceof XtextResourceSet)) {
final boolean cancelationAllowed = (this.cancelationAllowed.get()).booleanValue();
final int current = ((XtextResourceSet)rs).getModificationStamp();
... | java | public CancelIndicator newCancelIndicator(final ResourceSet rs) {
CancelIndicator _xifexpression = null;
if ((rs instanceof XtextResourceSet)) {
final boolean cancelationAllowed = (this.cancelationAllowed.get()).booleanValue();
final int current = ((XtextResourceSet)rs).getModificationStamp();
... | [
"public",
"CancelIndicator",
"newCancelIndicator",
"(",
"final",
"ResourceSet",
"rs",
")",
"{",
"CancelIndicator",
"_xifexpression",
"=",
"null",
";",
"if",
"(",
"(",
"rs",
"instanceof",
"XtextResourceSet",
")",
")",
"{",
"final",
"boolean",
"cancelationAllowed",
... | Created a fresh CancelIndicator | [
"Created",
"a",
"fresh",
"CancelIndicator"
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/OutdatedStateManager.java#L41-L54 |
161,968 | eclipse/xtext-core | org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/editor/contentassist/IdeContentProposalCreator.java | IdeContentProposalCreator.createProposal | public ContentAssistEntry createProposal(final String proposal, final ContentAssistContext context) {
return this.createProposal(proposal, context.getPrefix(), context, ContentAssistEntry.KIND_UNKNOWN, null);
} | java | public ContentAssistEntry createProposal(final String proposal, final ContentAssistContext context) {
return this.createProposal(proposal, context.getPrefix(), context, ContentAssistEntry.KIND_UNKNOWN, null);
} | [
"public",
"ContentAssistEntry",
"createProposal",
"(",
"final",
"String",
"proposal",
",",
"final",
"ContentAssistContext",
"context",
")",
"{",
"return",
"this",
".",
"createProposal",
"(",
"proposal",
",",
"context",
".",
"getPrefix",
"(",
")",
",",
"context",
... | Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid. | [
"Returns",
"an",
"entry",
"with",
"the",
"given",
"proposal",
"and",
"the",
"prefix",
"from",
"the",
"context",
"or",
"null",
"if",
"the",
"proposal",
"is",
"not",
"valid",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/editor/contentassist/IdeContentProposalCreator.java#L36-L38 |
161,969 | eclipse/xtext-core | org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/editor/contentassist/IdeContentProposalCreator.java | IdeContentProposalCreator.createSnippet | public ContentAssistEntry createSnippet(final String proposal, final String label, final ContentAssistContext context) {
final Procedure1<ContentAssistEntry> _function = (ContentAssistEntry it) -> {
it.setLabel(label);
};
return this.createProposal(proposal, context.getPrefix(), context, ContentAssist... | java | public ContentAssistEntry createSnippet(final String proposal, final String label, final ContentAssistContext context) {
final Procedure1<ContentAssistEntry> _function = (ContentAssistEntry it) -> {
it.setLabel(label);
};
return this.createProposal(proposal, context.getPrefix(), context, ContentAssist... | [
"public",
"ContentAssistEntry",
"createSnippet",
"(",
"final",
"String",
"proposal",
",",
"final",
"String",
"label",
",",
"final",
"ContentAssistContext",
"context",
")",
"{",
"final",
"Procedure1",
"<",
"ContentAssistEntry",
">",
"_function",
"=",
"(",
"ContentAss... | Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.
@since 2.16 | [
"Returns",
"an",
"entry",
"of",
"kind",
"snippet",
"with",
"the",
"given",
"proposal",
"and",
"label",
"and",
"the",
"prefix",
"from",
"the",
"context",
"or",
"null",
"if",
"the",
"proposal",
"is",
"not",
"valid",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/editor/contentassist/IdeContentProposalCreator.java#L44-L49 |
161,970 | eclipse/xtext-core | org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/editor/contentassist/IdeContentProposalCreator.java | IdeContentProposalCreator.createProposal | public ContentAssistEntry createProposal(final String proposal, final ContentAssistContext context, final Procedure1<? super ContentAssistEntry> init) {
return this.createProposal(proposal, context.getPrefix(), context, ContentAssistEntry.KIND_UNKNOWN, init);
} | java | public ContentAssistEntry createProposal(final String proposal, final ContentAssistContext context, final Procedure1<? super ContentAssistEntry> init) {
return this.createProposal(proposal, context.getPrefix(), context, ContentAssistEntry.KIND_UNKNOWN, init);
} | [
"public",
"ContentAssistEntry",
"createProposal",
"(",
"final",
"String",
"proposal",
",",
"final",
"ContentAssistContext",
"context",
",",
"final",
"Procedure1",
"<",
"?",
"super",
"ContentAssistEntry",
">",
"init",
")",
"{",
"return",
"this",
".",
"createProposal"... | Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.
If it is valid, the initializer function is applied to it. | [
"Returns",
"an",
"entry",
"with",
"the",
"given",
"proposal",
"and",
"the",
"prefix",
"from",
"the",
"context",
"or",
"null",
"if",
"the",
"proposal",
"is",
"not",
"valid",
".",
"If",
"it",
"is",
"valid",
"the",
"initializer",
"function",
"is",
"applied",
... | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/editor/contentassist/IdeContentProposalCreator.java#L55-L57 |
161,971 | eclipse/xtext-core | org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/editor/contentassist/IdeContentProposalCreator.java | IdeContentProposalCreator.createProposal | public ContentAssistEntry createProposal(final String proposal, final String prefix, final ContentAssistContext context, final String kind, final Procedure1<? super ContentAssistEntry> init) {
boolean _isValidProposal = this.isValidProposal(proposal, prefix, context);
if (_isValidProposal) {
final Content... | java | public ContentAssistEntry createProposal(final String proposal, final String prefix, final ContentAssistContext context, final String kind, final Procedure1<? super ContentAssistEntry> init) {
boolean _isValidProposal = this.isValidProposal(proposal, prefix, context);
if (_isValidProposal) {
final Content... | [
"public",
"ContentAssistEntry",
"createProposal",
"(",
"final",
"String",
"proposal",
",",
"final",
"String",
"prefix",
",",
"final",
"ContentAssistContext",
"context",
",",
"final",
"String",
"kind",
",",
"final",
"Procedure1",
"<",
"?",
"super",
"ContentAssistEntr... | Returns an entry with the given proposal and prefix, or null if the proposal is not valid.
If it is valid, the initializer function is applied to it. | [
"Returns",
"an",
"entry",
"with",
"the",
"given",
"proposal",
"and",
"prefix",
"or",
"null",
"if",
"the",
"proposal",
"is",
"not",
"valid",
".",
"If",
"it",
"is",
"valid",
"the",
"initializer",
"function",
"is",
"applied",
"to",
"it",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/editor/contentassist/IdeContentProposalCreator.java#L71-L86 |
161,972 | eclipse/xtext-core | org.eclipse.xtext.util/xtend-gen/org/eclipse/xtext/util/UriExtensions.java | UriExtensions.toDecodedString | public String toDecodedString(final java.net.URI uri) {
final String scheme = uri.getScheme();
final String part = uri.getSchemeSpecificPart();
if ((scheme == null)) {
return part;
}
return ((scheme + ":") + part);
} | java | public String toDecodedString(final java.net.URI uri) {
final String scheme = uri.getScheme();
final String part = uri.getSchemeSpecificPart();
if ((scheme == null)) {
return part;
}
return ((scheme + ":") + part);
} | [
"public",
"String",
"toDecodedString",
"(",
"final",
"java",
".",
"net",
".",
"URI",
"uri",
")",
"{",
"final",
"String",
"scheme",
"=",
"uri",
".",
"getScheme",
"(",
")",
";",
"final",
"String",
"part",
"=",
"uri",
".",
"getSchemeSpecificPart",
"(",
")",... | converts a java.net.URI to a decoded string | [
"converts",
"a",
"java",
".",
"net",
".",
"URI",
"to",
"a",
"decoded",
"string"
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/xtend-gen/org/eclipse/xtext/util/UriExtensions.java#L48-L55 |
161,973 | eclipse/xtext-core | org.eclipse.xtext.util/xtend-gen/org/eclipse/xtext/util/UriExtensions.java | UriExtensions.withEmptyAuthority | public URI withEmptyAuthority(final URI uri) {
URI _xifexpression = null;
if ((uri.isFile() && (uri.authority() == null))) {
_xifexpression = URI.createHierarchicalURI(uri.scheme(), "", uri.device(), uri.segments(), uri.query(), uri.fragment());
} else {
_xifexpression = uri;
}
return _x... | java | public URI withEmptyAuthority(final URI uri) {
URI _xifexpression = null;
if ((uri.isFile() && (uri.authority() == null))) {
_xifexpression = URI.createHierarchicalURI(uri.scheme(), "", uri.device(), uri.segments(), uri.query(), uri.fragment());
} else {
_xifexpression = uri;
}
return _x... | [
"public",
"URI",
"withEmptyAuthority",
"(",
"final",
"URI",
"uri",
")",
"{",
"URI",
"_xifexpression",
"=",
"null",
";",
"if",
"(",
"(",
"uri",
".",
"isFile",
"(",
")",
"&&",
"(",
"uri",
".",
"authority",
"(",
")",
"==",
"null",
")",
")",
")",
"{",
... | converts the file URIs with an absent authority to one with an empty | [
"converts",
"the",
"file",
"URIs",
"with",
"an",
"absent",
"authority",
"to",
"one",
"with",
"an",
"empty"
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/xtend-gen/org/eclipse/xtext/util/UriExtensions.java#L60-L68 |
161,974 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/antlr/RequiredRuleNameComputer.java | RequiredRuleNameComputer.getRequiredRuleNames | public String[][] getRequiredRuleNames(Param param) {
if (isFiltered(param)) {
return EMPTY_ARRAY;
}
AbstractElement elementToParse = param.elementToParse;
String ruleName = param.ruleName;
if (ruleName == null) {
return getRequiredRuleNames(param, elementToParse);
}
return getAdjustedRequiredRuleNa... | java | public String[][] getRequiredRuleNames(Param param) {
if (isFiltered(param)) {
return EMPTY_ARRAY;
}
AbstractElement elementToParse = param.elementToParse;
String ruleName = param.ruleName;
if (ruleName == null) {
return getRequiredRuleNames(param, elementToParse);
}
return getAdjustedRequiredRuleNa... | [
"public",
"String",
"[",
"]",
"[",
"]",
"getRequiredRuleNames",
"(",
"Param",
"param",
")",
"{",
"if",
"(",
"isFiltered",
"(",
"param",
")",
")",
"{",
"return",
"EMPTY_ARRAY",
";",
"}",
"AbstractElement",
"elementToParse",
"=",
"param",
".",
"elementToParse"... | Returns the names of parser rules that should be called in order to obtain the follow elements for the parser
call stack described by the given param. | [
"Returns",
"the",
"names",
"of",
"parser",
"rules",
"that",
"should",
"be",
"called",
"in",
"order",
"to",
"obtain",
"the",
"follow",
"elements",
"for",
"the",
"parser",
"call",
"stack",
"described",
"by",
"the",
"given",
"param",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/antlr/RequiredRuleNameComputer.java#L76-L86 |
161,975 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/antlr/RequiredRuleNameComputer.java | RequiredRuleNameComputer.isFiltered | protected boolean isFiltered(Param param) {
AbstractElement elementToParse = param.elementToParse;
while (elementToParse != null) {
if (isFiltered(elementToParse, param)) {
return true;
}
elementToParse = getEnclosingSingleElementGroup(elementToParse);
}
return false;
} | java | protected boolean isFiltered(Param param) {
AbstractElement elementToParse = param.elementToParse;
while (elementToParse != null) {
if (isFiltered(elementToParse, param)) {
return true;
}
elementToParse = getEnclosingSingleElementGroup(elementToParse);
}
return false;
} | [
"protected",
"boolean",
"isFiltered",
"(",
"Param",
"param",
")",
"{",
"AbstractElement",
"elementToParse",
"=",
"param",
".",
"elementToParse",
";",
"while",
"(",
"elementToParse",
"!=",
"null",
")",
"{",
"if",
"(",
"isFiltered",
"(",
"elementToParse",
",",
"... | Returns true if the grammar element that is associated with the given param is filtered due to guard conditions
of parameterized rules in the current call stack.
If the grammar element is the only element contained in a group, its container is checked, too.
@see #isFiltered(AbstractElement, Param) | [
"Returns",
"true",
"if",
"the",
"grammar",
"element",
"that",
"is",
"associated",
"with",
"the",
"given",
"param",
"is",
"filtered",
"due",
"to",
"guard",
"conditions",
"of",
"parameterized",
"rules",
"in",
"the",
"current",
"call",
"stack",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/antlr/RequiredRuleNameComputer.java#L169-L178 |
161,976 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/antlr/RequiredRuleNameComputer.java | RequiredRuleNameComputer.getEnclosingSingleElementGroup | protected AbstractElement getEnclosingSingleElementGroup(AbstractElement elementToParse) {
EObject container = elementToParse.eContainer();
if (container instanceof Group) {
if (((Group) container).getElements().size() == 1) {
return (AbstractElement) container;
}
}
return null;
} | java | protected AbstractElement getEnclosingSingleElementGroup(AbstractElement elementToParse) {
EObject container = elementToParse.eContainer();
if (container instanceof Group) {
if (((Group) container).getElements().size() == 1) {
return (AbstractElement) container;
}
}
return null;
} | [
"protected",
"AbstractElement",
"getEnclosingSingleElementGroup",
"(",
"AbstractElement",
"elementToParse",
")",
"{",
"EObject",
"container",
"=",
"elementToParse",
".",
"eContainer",
"(",
")",
";",
"if",
"(",
"container",
"instanceof",
"Group",
")",
"{",
"if",
"(",... | Return the containing group if it contains exactly one element.
@since 2.14 | [
"Return",
"the",
"containing",
"group",
"if",
"it",
"contains",
"exactly",
"one",
"element",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/antlr/RequiredRuleNameComputer.java#L185-L193 |
161,977 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/antlr/RequiredRuleNameComputer.java | RequiredRuleNameComputer.isFiltered | protected boolean isFiltered(AbstractElement canddiate, Param param) {
if (canddiate instanceof Group) {
Group group = (Group) canddiate;
if (group.getGuardCondition() != null) {
Set<Parameter> context = param.getAssignedParametes();
ConditionEvaluator evaluator = new ConditionEvaluator(context);
if... | java | protected boolean isFiltered(AbstractElement canddiate, Param param) {
if (canddiate instanceof Group) {
Group group = (Group) canddiate;
if (group.getGuardCondition() != null) {
Set<Parameter> context = param.getAssignedParametes();
ConditionEvaluator evaluator = new ConditionEvaluator(context);
if... | [
"protected",
"boolean",
"isFiltered",
"(",
"AbstractElement",
"canddiate",
",",
"Param",
"param",
")",
"{",
"if",
"(",
"canddiate",
"instanceof",
"Group",
")",
"{",
"Group",
"group",
"=",
"(",
"Group",
")",
"canddiate",
";",
"if",
"(",
"group",
".",
"getGu... | Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph. | [
"Returns",
"true",
"if",
"the",
"given",
"candidate",
"is",
"a",
"group",
"that",
"is",
"filtered",
"due",
"to",
"rule",
"parameters",
"in",
"the",
"current",
"call",
"graph",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/antlr/RequiredRuleNameComputer.java#L198-L210 |
161,978 | eclipse/xtext-core | org.eclipse.xtext.util/src/org/eclipse/xtext/util/internal/CodeGenUtil2.java | CodeGenUtil2.isJavaLangType | public static boolean isJavaLangType(String s) {
return getJavaDefaultTypes().contains(s) && Character.isUpperCase(s.charAt(0));
} | java | public static boolean isJavaLangType(String s) {
return getJavaDefaultTypes().contains(s) && Character.isUpperCase(s.charAt(0));
} | [
"public",
"static",
"boolean",
"isJavaLangType",
"(",
"String",
"s",
")",
"{",
"return",
"getJavaDefaultTypes",
"(",
")",
".",
"contains",
"(",
"s",
")",
"&&",
"Character",
".",
"isUpperCase",
"(",
"s",
".",
"charAt",
"(",
"0",
")",
")",
";",
"}"
] | Tests whether the given string is the name of a java.lang type. | [
"Tests",
"whether",
"the",
"given",
"string",
"is",
"the",
"name",
"of",
"a",
"java",
".",
"lang",
"type",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/src/org/eclipse/xtext/util/internal/CodeGenUtil2.java#L28-L30 |
161,979 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/ContentAssistContext.java | ContentAssistContext.copy | public ContentAssistContext.Builder copy() {
Builder result = builderProvider.get();
result.copyFrom(this);
return result;
} | java | public ContentAssistContext.Builder copy() {
Builder result = builderProvider.get();
result.copyFrom(this);
return result;
} | [
"public",
"ContentAssistContext",
".",
"Builder",
"copy",
"(",
")",
"{",
"Builder",
"result",
"=",
"builderProvider",
".",
"get",
"(",
")",
";",
"result",
".",
"copyFrom",
"(",
"this",
")",
";",
"return",
"result",
";",
"}"
] | Use this context as prototype for a new mutable builder. The new builder is
pre-populated with the current settings of this context instance. | [
"Use",
"this",
"context",
"as",
"prototype",
"for",
"a",
"new",
"mutable",
"builder",
".",
"The",
"new",
"builder",
"is",
"pre",
"-",
"populated",
"with",
"the",
"current",
"settings",
"of",
"this",
"context",
"instance",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/ContentAssistContext.java#L175-L179 |
161,980 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/ContentAssistContext.java | ContentAssistContext.getFirstSetGrammarElements | public ImmutableList<AbstractElement> getFirstSetGrammarElements() {
if (firstSetGrammarElements == null) {
firstSetGrammarElements = ImmutableList.copyOf(mutableFirstSetGrammarElements);
}
return firstSetGrammarElements;
} | java | public ImmutableList<AbstractElement> getFirstSetGrammarElements() {
if (firstSetGrammarElements == null) {
firstSetGrammarElements = ImmutableList.copyOf(mutableFirstSetGrammarElements);
}
return firstSetGrammarElements;
} | [
"public",
"ImmutableList",
"<",
"AbstractElement",
">",
"getFirstSetGrammarElements",
"(",
")",
"{",
"if",
"(",
"firstSetGrammarElements",
"==",
"null",
")",
"{",
"firstSetGrammarElements",
"=",
"ImmutableList",
".",
"copyOf",
"(",
"mutableFirstSetGrammarElements",
")",... | The grammar elements that may occur at the given offset. | [
"The",
"grammar",
"elements",
"that",
"may",
"occur",
"at",
"the",
"given",
"offset",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/ContentAssistContext.java#L266-L271 |
161,981 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/ContentAssistContext.java | ContentAssistContext.getReplaceContextLength | public int getReplaceContextLength() {
if (replaceContextLength == null) {
int replacementOffset = getReplaceRegion().getOffset();
ITextRegion currentRegion = getCurrentNode().getTextRegion();
int replaceContextLength = currentRegion.getLength() - (replacementOffset - currentRegion.getOffset());
this.repl... | java | public int getReplaceContextLength() {
if (replaceContextLength == null) {
int replacementOffset = getReplaceRegion().getOffset();
ITextRegion currentRegion = getCurrentNode().getTextRegion();
int replaceContextLength = currentRegion.getLength() - (replacementOffset - currentRegion.getOffset());
this.repl... | [
"public",
"int",
"getReplaceContextLength",
"(",
")",
"{",
"if",
"(",
"replaceContextLength",
"==",
"null",
")",
"{",
"int",
"replacementOffset",
"=",
"getReplaceRegion",
"(",
")",
".",
"getOffset",
"(",
")",
";",
"ITextRegion",
"currentRegion",
"=",
"getCurrent... | The length of the region left to the completion offset that is part of the
replace region. | [
"The",
"length",
"of",
"the",
"region",
"left",
"to",
"the",
"completion",
"offset",
"that",
"is",
"part",
"of",
"the",
"replace",
"region",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/ContentAssistContext.java#L277-L286 |
161,982 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/formatting/impl/NodeModelStreamer.java | NodeModelStreamer.getFormattedDatatypeValue | protected String getFormattedDatatypeValue(ICompositeNode node, AbstractRule rule, String text) throws ValueConverterException {
Object value = valueConverter.toValue(text, rule.getName(), node);
text = valueConverter.toString(value, rule.getName());
return text;
} | java | protected String getFormattedDatatypeValue(ICompositeNode node, AbstractRule rule, String text) throws ValueConverterException {
Object value = valueConverter.toValue(text, rule.getName(), node);
text = valueConverter.toString(value, rule.getName());
return text;
} | [
"protected",
"String",
"getFormattedDatatypeValue",
"(",
"ICompositeNode",
"node",
",",
"AbstractRule",
"rule",
",",
"String",
"text",
")",
"throws",
"ValueConverterException",
"{",
"Object",
"value",
"=",
"valueConverter",
".",
"toValue",
"(",
"text",
",",
"rule",
... | Create a canonical represenation of the data type value. Defaults to the value converter.
@since 2.9 | [
"Create",
"a",
"canonical",
"represenation",
"of",
"the",
"data",
"type",
"value",
".",
"Defaults",
"to",
"the",
"value",
"converter",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/formatting/impl/NodeModelStreamer.java#L163-L167 |
161,983 | eclipse/xtext-core | org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/parser/antlr/splitting/internal/LexerSpecialStateTransitionSplitter.java | LexerSpecialStateTransitionSplitter.splitSpecialStateSwitch | public String splitSpecialStateSwitch(String specialStateTransition){
Matcher transformedSpecialStateMatcher =
TRANSORMED_SPECIAL_STATE_TRANSITION_METHOD.matcher(specialStateTransition);
if( !transformedSpecialStateMatcher.find() ){
return specialStateTransition;
}
String specialStateSwitch = transfor... | java | public String splitSpecialStateSwitch(String specialStateTransition){
Matcher transformedSpecialStateMatcher =
TRANSORMED_SPECIAL_STATE_TRANSITION_METHOD.matcher(specialStateTransition);
if( !transformedSpecialStateMatcher.find() ){
return specialStateTransition;
}
String specialStateSwitch = transfor... | [
"public",
"String",
"splitSpecialStateSwitch",
"(",
"String",
"specialStateTransition",
")",
"{",
"Matcher",
"transformedSpecialStateMatcher",
"=",
"TRANSORMED_SPECIAL_STATE_TRANSITION_METHOD",
".",
"matcher",
"(",
"specialStateTransition",
")",
";",
"if",
"(",
"!",
"transf... | Splits switch in specialStateTransition containing more than maxCasesPerSwitch
cases into several methods each containing maximum of maxCasesPerSwitch cases
or less.
@since 2.9 | [
"Splits",
"switch",
"in",
"specialStateTransition",
"containing",
"more",
"than",
"maxCasesPerSwitch",
"cases",
"into",
"several",
"methods",
"each",
"containing",
"maximum",
"of",
"maxCasesPerSwitch",
"cases",
"or",
"less",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/parser/antlr/splitting/internal/LexerSpecialStateTransitionSplitter.java#L153-L206 |
161,984 | eclipse/xtext-core | org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/PluginXmlAccess.java | PluginXmlAccess.merge | public boolean merge(final PluginXmlAccess other) {
boolean _xblockexpression = false;
{
String _path = this.getPath();
String _path_1 = other.getPath();
boolean _notEquals = (!Objects.equal(_path, _path_1));
if (_notEquals) {
String _path_2 = this.getPath();
String _plus... | java | public boolean merge(final PluginXmlAccess other) {
boolean _xblockexpression = false;
{
String _path = this.getPath();
String _path_1 = other.getPath();
boolean _notEquals = (!Objects.equal(_path, _path_1));
if (_notEquals) {
String _path_2 = this.getPath();
String _plus... | [
"public",
"boolean",
"merge",
"(",
"final",
"PluginXmlAccess",
"other",
")",
"{",
"boolean",
"_xblockexpression",
"=",
"false",
";",
"{",
"String",
"_path",
"=",
"this",
".",
"getPath",
"(",
")",
";",
"String",
"_path_1",
"=",
"other",
".",
"getPath",
"(",... | Merge the contents of the given plugin.xml into this one. | [
"Merge",
"the",
"contents",
"of",
"the",
"given",
"plugin",
".",
"xml",
"into",
"this",
"one",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/PluginXmlAccess.java#L80-L97 |
161,985 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/server/occurrences/DefaultDocumentHighlightService.java | DefaultDocumentHighlightService.getTargetURIs | protected Iterable<URI> getTargetURIs(final EObject primaryTarget) {
final TargetURIs result = targetURIsProvider.get();
uriCollector.add(primaryTarget, result);
return result;
} | java | protected Iterable<URI> getTargetURIs(final EObject primaryTarget) {
final TargetURIs result = targetURIsProvider.get();
uriCollector.add(primaryTarget, result);
return result;
} | [
"protected",
"Iterable",
"<",
"URI",
">",
"getTargetURIs",
"(",
"final",
"EObject",
"primaryTarget",
")",
"{",
"final",
"TargetURIs",
"result",
"=",
"targetURIsProvider",
".",
"get",
"(",
")",
";",
"uriCollector",
".",
"add",
"(",
"primaryTarget",
",",
"result... | Returns with an iterable of URIs that points to all elements that are
referenced by the argument or vice-versa.
@return an iterable of URIs that are referenced by the argument or the
other way around. | [
"Returns",
"with",
"an",
"iterable",
"of",
"URIs",
"that",
"points",
"to",
"all",
"elements",
"that",
"are",
"referenced",
"by",
"the",
"argument",
"or",
"vice",
"-",
"versa",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/server/occurrences/DefaultDocumentHighlightService.java#L245-L249 |
161,986 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/mwe/NameBasedFilter.java | NameBasedFilter.setRegularExpression | public void setRegularExpression(String regularExpression) {
if (regularExpression != null)
this.regularExpression = Pattern.compile(regularExpression);
else
this.regularExpression = null;
} | java | public void setRegularExpression(String regularExpression) {
if (regularExpression != null)
this.regularExpression = Pattern.compile(regularExpression);
else
this.regularExpression = null;
} | [
"public",
"void",
"setRegularExpression",
"(",
"String",
"regularExpression",
")",
"{",
"if",
"(",
"regularExpression",
"!=",
"null",
")",
"this",
".",
"regularExpression",
"=",
"Pattern",
".",
"compile",
"(",
"regularExpression",
")",
";",
"else",
"this",
".",
... | Filter the URI based on a regular expression.
Can be combined with an additional file-extension filter. | [
"Filter",
"the",
"URI",
"based",
"on",
"a",
"regular",
"expression",
".",
"Can",
"be",
"combined",
"with",
"an",
"additional",
"file",
"-",
"extension",
"filter",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/mwe/NameBasedFilter.java#L54-L59 |
161,987 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/resource/generic/AbstractGenericResourceSupport.java | AbstractGenericResourceSupport.registerServices | public void registerServices(boolean force) {
Injector injector = Guice.createInjector(getGuiceModule());
injector.injectMembers(this);
registerInRegistry(force);
} | java | public void registerServices(boolean force) {
Injector injector = Guice.createInjector(getGuiceModule());
injector.injectMembers(this);
registerInRegistry(force);
} | [
"public",
"void",
"registerServices",
"(",
"boolean",
"force",
")",
"{",
"Injector",
"injector",
"=",
"Guice",
".",
"createInjector",
"(",
"getGuiceModule",
"(",
")",
")",
";",
"injector",
".",
"injectMembers",
"(",
"this",
")",
";",
"registerInRegistry",
"(",... | Inject members into this instance and register the services afterwards.
@see #getGuiceModule()
@see #registerInRegistry(boolean)
@since 2.1 | [
"Inject",
"members",
"into",
"this",
"instance",
"and",
"register",
"the",
"services",
"afterwards",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/resource/generic/AbstractGenericResourceSupport.java#L54-L58 |
161,988 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/resource/impl/ResourceDescriptionsData.java | ResourceDescriptionsData.register | public void register(Delta delta) {
final IResourceDescription newDesc = delta.getNew();
if (newDesc == null) {
removeDescription(delta.getUri());
} else {
addDescription(delta.getUri(), newDesc);
}
} | java | public void register(Delta delta) {
final IResourceDescription newDesc = delta.getNew();
if (newDesc == null) {
removeDescription(delta.getUri());
} else {
addDescription(delta.getUri(), newDesc);
}
} | [
"public",
"void",
"register",
"(",
"Delta",
"delta",
")",
"{",
"final",
"IResourceDescription",
"newDesc",
"=",
"delta",
".",
"getNew",
"(",
")",
";",
"if",
"(",
"newDesc",
"==",
"null",
")",
"{",
"removeDescription",
"(",
"delta",
".",
"getUri",
"(",
")... | Put a new resource description into the index, or remove one if the delta has no new description. A delta for a
particular URI may be registered more than once; overwriting any earlier registration.
@param delta
The resource change.
@since 2.9 | [
"Put",
"a",
"new",
"resource",
"description",
"into",
"the",
"index",
"or",
"remove",
"one",
"if",
"the",
"delta",
"has",
"no",
"new",
"description",
".",
"A",
"delta",
"for",
"a",
"particular",
"URI",
"may",
"be",
"registered",
"more",
"than",
"once",
"... | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/resource/impl/ResourceDescriptionsData.java#L241-L248 |
161,989 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/generator/trace/internal/AbstractTraceForURIProvider.java | AbstractTraceForURIProvider.getGeneratedLocation | protected AbsoluteURI getGeneratedLocation(PersistedTrace trace) {
AbsoluteURI path = trace.getPath();
String fileName = traceFileNameProvider.getJavaFromTrace(path.getURI().toString());
return new AbsoluteURI(fileName);
} | java | protected AbsoluteURI getGeneratedLocation(PersistedTrace trace) {
AbsoluteURI path = trace.getPath();
String fileName = traceFileNameProvider.getJavaFromTrace(path.getURI().toString());
return new AbsoluteURI(fileName);
} | [
"protected",
"AbsoluteURI",
"getGeneratedLocation",
"(",
"PersistedTrace",
"trace",
")",
"{",
"AbsoluteURI",
"path",
"=",
"trace",
".",
"getPath",
"(",
")",
";",
"String",
"fileName",
"=",
"traceFileNameProvider",
".",
"getJavaFromTrace",
"(",
"path",
".",
"getURI... | Compute the location of the generated file from the given trace file. | [
"Compute",
"the",
"location",
"of",
"the",
"generated",
"file",
"from",
"the",
"given",
"trace",
"file",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/generator/trace/internal/AbstractTraceForURIProvider.java#L276-L280 |
161,990 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/scoping/Scopes.java | Scopes.scopeFor | public static <T extends EObject> IScope scopeFor(Iterable<? extends T> elements,
final Function<T, QualifiedName> nameComputation, IScope outer) {
return new SimpleScope(outer,scopedElementsFor(elements, nameComputation));
} | java | public static <T extends EObject> IScope scopeFor(Iterable<? extends T> elements,
final Function<T, QualifiedName> nameComputation, IScope outer) {
return new SimpleScope(outer,scopedElementsFor(elements, nameComputation));
} | [
"public",
"static",
"<",
"T",
"extends",
"EObject",
">",
"IScope",
"scopeFor",
"(",
"Iterable",
"<",
"?",
"extends",
"T",
">",
"elements",
",",
"final",
"Function",
"<",
"T",
",",
"QualifiedName",
">",
"nameComputation",
",",
"IScope",
"outer",
")",
"{",
... | creates a scope using the passed function to compute the names and sets the passed scope as the parent scope | [
"creates",
"a",
"scope",
"using",
"the",
"passed",
"function",
"to",
"compute",
"the",
"names",
"and",
"sets",
"the",
"passed",
"scope",
"as",
"the",
"parent",
"scope"
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/scoping/Scopes.java#L68-L71 |
161,991 | eclipse/xtext-core | org.eclipse.xtext.util/src/org/eclipse/xtext/util/PolymorphicDispatcher.java | PolymorphicDispatcher.compare | protected int compare(MethodDesc o1, MethodDesc o2) {
final Class<?>[] paramTypes1 = o1.getParameterTypes();
final Class<?>[] paramTypes2 = o2.getParameterTypes();
// sort by parameter types from left to right
for (int i = 0; i < paramTypes1.length; i++) {
final Class<?> class1 = paramTypes1[i];
final Cl... | java | protected int compare(MethodDesc o1, MethodDesc o2) {
final Class<?>[] paramTypes1 = o1.getParameterTypes();
final Class<?>[] paramTypes2 = o2.getParameterTypes();
// sort by parameter types from left to right
for (int i = 0; i < paramTypes1.length; i++) {
final Class<?> class1 = paramTypes1[i];
final Cl... | [
"protected",
"int",
"compare",
"(",
"MethodDesc",
"o1",
",",
"MethodDesc",
"o2",
")",
"{",
"final",
"Class",
"<",
"?",
">",
"[",
"]",
"paramTypes1",
"=",
"o1",
".",
"getParameterTypes",
"(",
")",
";",
"final",
"Class",
"<",
"?",
">",
"[",
"]",
"param... | returns > 0 when o1 is more specific than o2,
returns == 0 when o1 and o2 are equal or unrelated,
returns < 0 when o2 is more specific than o1, | [
"returns",
">",
";",
"0",
"when",
"o1",
"is",
"more",
"specific",
"than",
"o2"
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/src/org/eclipse/xtext/util/PolymorphicDispatcher.java#L219-L247 |
161,992 | eclipse/xtext-core | org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/persistence/ResourceStorageWritable.java | ResourceStorageWritable.writeEntries | protected void writeEntries(final StorageAwareResource resource, final ZipOutputStream zipOut) throws IOException {
final BufferedOutputStream bufferedOutput = new BufferedOutputStream(zipOut);
ZipEntry _zipEntry = new ZipEntry("emf-contents");
zipOut.putNextEntry(_zipEntry);
try {
this.writeConte... | java | protected void writeEntries(final StorageAwareResource resource, final ZipOutputStream zipOut) throws IOException {
final BufferedOutputStream bufferedOutput = new BufferedOutputStream(zipOut);
ZipEntry _zipEntry = new ZipEntry("emf-contents");
zipOut.putNextEntry(_zipEntry);
try {
this.writeConte... | [
"protected",
"void",
"writeEntries",
"(",
"final",
"StorageAwareResource",
"resource",
",",
"final",
"ZipOutputStream",
"zipOut",
")",
"throws",
"IOException",
"{",
"final",
"BufferedOutputStream",
"bufferedOutput",
"=",
"new",
"BufferedOutputStream",
"(",
"zipOut",
")"... | Write entries into the storage.
Overriding methods should first delegate to super before adding their own entries. | [
"Write",
"entries",
"into",
"the",
"storage",
".",
"Overriding",
"methods",
"should",
"first",
"delegate",
"to",
"super",
"before",
"adding",
"their",
"own",
"entries",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/persistence/ResourceStorageWritable.java#L61-L89 |
161,993 | eclipse/xtext-core | org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/IndentationAwareCompletionPrefixProvider.java | IndentationAwareCompletionPrefixProvider.getInputToParse | @Override
public String getInputToParse(String completeInput, int offset, int completionOffset) {
int fixedOffset = getOffsetIncludingWhitespace(completeInput, offset, Math.min(completeInput.length(), completionOffset));
return super.getInputToParse(completeInput, fixedOffset, completionOffset);
} | java | @Override
public String getInputToParse(String completeInput, int offset, int completionOffset) {
int fixedOffset = getOffsetIncludingWhitespace(completeInput, offset, Math.min(completeInput.length(), completionOffset));
return super.getInputToParse(completeInput, fixedOffset, completionOffset);
} | [
"@",
"Override",
"public",
"String",
"getInputToParse",
"(",
"String",
"completeInput",
",",
"int",
"offset",
",",
"int",
"completionOffset",
")",
"{",
"int",
"fixedOffset",
"=",
"getOffsetIncludingWhitespace",
"(",
"completeInput",
",",
"offset",
",",
"Math",
"."... | Returns the input to parse including the whitespace left to the cursor position since
it may be relevant to the list of proposals for whitespace sensitive languages. | [
"Returns",
"the",
"input",
"to",
"parse",
"including",
"the",
"whitespace",
"left",
"to",
"the",
"cursor",
"position",
"since",
"it",
"may",
"be",
"relevant",
"to",
"the",
"list",
"of",
"proposals",
"for",
"whitespace",
"sensitive",
"languages",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/IndentationAwareCompletionPrefixProvider.java#L41-L45 |
161,994 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/xtext/GrammarResource.java | GrammarResource.doLinking | @Override
protected void doLinking() {
IParseResult parseResult = getParseResult();
if (parseResult == null || parseResult.getRootASTElement() == null)
return;
XtextLinker castedLinker = (XtextLinker) getLinker();
castedLinker.discardGeneratedPackages(parseResult.getRootASTElement());
} | java | @Override
protected void doLinking() {
IParseResult parseResult = getParseResult();
if (parseResult == null || parseResult.getRootASTElement() == null)
return;
XtextLinker castedLinker = (XtextLinker) getLinker();
castedLinker.discardGeneratedPackages(parseResult.getRootASTElement());
} | [
"@",
"Override",
"protected",
"void",
"doLinking",
"(",
")",
"{",
"IParseResult",
"parseResult",
"=",
"getParseResult",
"(",
")",
";",
"if",
"(",
"parseResult",
"==",
"null",
"||",
"parseResult",
".",
"getRootASTElement",
"(",
")",
"==",
"null",
")",
"return... | Overridden to do only the clean-part of the linking but not
the actual linking. This is deferred until someone wants to access
the content of the resource. | [
"Overridden",
"to",
"do",
"only",
"the",
"clean",
"-",
"part",
"of",
"the",
"linking",
"but",
"not",
"the",
"actual",
"linking",
".",
"This",
"is",
"deferred",
"until",
"someone",
"wants",
"to",
"access",
"the",
"content",
"of",
"the",
"resource",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/xtext/GrammarResource.java#L34-L42 |
161,995 | eclipse/xtext-core | org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/persistence/SourceLevelURIsAdapter.java | SourceLevelURIsAdapter.setSourceLevelUrisWithoutCopy | public static void setSourceLevelUrisWithoutCopy(final ResourceSet resourceSet, final Set<URI> uris) {
final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findOrCreateAdapter(resourceSet);
adapter.sourceLevelURIs = uris;
} | java | public static void setSourceLevelUrisWithoutCopy(final ResourceSet resourceSet, final Set<URI> uris) {
final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findOrCreateAdapter(resourceSet);
adapter.sourceLevelURIs = uris;
} | [
"public",
"static",
"void",
"setSourceLevelUrisWithoutCopy",
"(",
"final",
"ResourceSet",
"resourceSet",
",",
"final",
"Set",
"<",
"URI",
">",
"uris",
")",
"{",
"final",
"SourceLevelURIsAdapter",
"adapter",
"=",
"SourceLevelURIsAdapter",
".",
"findOrCreateAdapter",
"(... | Installs the given set of URIs as the source level URIs. Does not copy the given
set but uses it directly. | [
"Installs",
"the",
"given",
"set",
"of",
"URIs",
"as",
"the",
"source",
"level",
"URIs",
".",
"Does",
"not",
"copy",
"the",
"given",
"set",
"but",
"uses",
"it",
"directly",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/persistence/SourceLevelURIsAdapter.java#L78-L81 |
161,996 | eclipse/xtext-core | org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/XtextGeneratorLanguage.java | XtextGeneratorLanguage.setFileExtensions | public void setFileExtensions(final String fileExtensions) {
this.fileExtensions = IterableExtensions.<String>toList(((Iterable<String>)Conversions.doWrapArray(fileExtensions.trim().split("\\s*,\\s*"))));
} | java | public void setFileExtensions(final String fileExtensions) {
this.fileExtensions = IterableExtensions.<String>toList(((Iterable<String>)Conversions.doWrapArray(fileExtensions.trim().split("\\s*,\\s*"))));
} | [
"public",
"void",
"setFileExtensions",
"(",
"final",
"String",
"fileExtensions",
")",
"{",
"this",
".",
"fileExtensions",
"=",
"IterableExtensions",
".",
"<",
"String",
">",
"toList",
"(",
"(",
"(",
"Iterable",
"<",
"String",
">",
")",
"Conversions",
".",
"d... | Either a single file extension or a comma-separated list of extensions for which the language
shall be registered. | [
"Either",
"a",
"single",
"file",
"extension",
"or",
"a",
"comma",
"-",
"separated",
"list",
"of",
"extensions",
"for",
"which",
"the",
"language",
"shall",
"be",
"registered",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/XtextGeneratorLanguage.java#L167-L169 |
161,997 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/nodemodel/util/NodeModelUtils.java | NodeModelUtils.compactDump | public static String compactDump(INode node, boolean showHidden) {
StringBuilder result = new StringBuilder();
try {
compactDump(node, showHidden, "", result);
} catch (IOException e) {
return e.getMessage();
}
return result.toString();
} | java | public static String compactDump(INode node, boolean showHidden) {
StringBuilder result = new StringBuilder();
try {
compactDump(node, showHidden, "", result);
} catch (IOException e) {
return e.getMessage();
}
return result.toString();
} | [
"public",
"static",
"String",
"compactDump",
"(",
"INode",
"node",
",",
"boolean",
"showHidden",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"try",
"{",
"compactDump",
"(",
"node",
",",
"showHidden",
",",
"\"\"",
",",
"... | Creates a string representation of the given node. Useful for debugging.
@return a debug string for the given node. | [
"Creates",
"a",
"string",
"representation",
"of",
"the",
"given",
"node",
".",
"Useful",
"for",
"debugging",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/nodemodel/util/NodeModelUtils.java#L341-L349 |
161,998 | eclipse/xtext-core | org.eclipse.xtext/src/org/eclipse/xtext/nodemodel/util/NodeModelUtils.java | NodeModelUtils.getTokenText | public static String getTokenText(INode node) {
if (node instanceof ILeafNode)
return ((ILeafNode) node).getText();
else {
StringBuilder builder = new StringBuilder(Math.max(node.getTotalLength(), 1));
boolean hiddenSeen = false;
for (ILeafNode leaf : node.getLeafNodes()) {
if (!leaf.isHidden()) {
... | java | public static String getTokenText(INode node) {
if (node instanceof ILeafNode)
return ((ILeafNode) node).getText();
else {
StringBuilder builder = new StringBuilder(Math.max(node.getTotalLength(), 1));
boolean hiddenSeen = false;
for (ILeafNode leaf : node.getLeafNodes()) {
if (!leaf.isHidden()) {
... | [
"public",
"static",
"String",
"getTokenText",
"(",
"INode",
"node",
")",
"{",
"if",
"(",
"node",
"instanceof",
"ILeafNode",
")",
"return",
"(",
"(",
"ILeafNode",
")",
"node",
")",
".",
"getText",
"(",
")",
";",
"else",
"{",
"StringBuilder",
"builder",
"=... | This method converts a node to text.
Leading and trailing text from hidden tokens (whitespace/comments) is removed. Text from hidden tokens that is
surrounded by text from non-hidden tokens is summarized to a single whitespace.
The preferred use case of this method is to convert the {@link ICompositeNode} that has be... | [
"This",
"method",
"converts",
"a",
"node",
"to",
"text",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/nodemodel/util/NodeModelUtils.java#L411-L429 |
161,999 | eclipse/xtext-core | org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/server/semanticHighlight/SemanticHighlightingRegistry.java | SemanticHighlightingRegistry.getAllScopes | public List<List<String>> getAllScopes() {
this.checkInitialized();
final ImmutableList.Builder<List<String>> builder = ImmutableList.<List<String>>builder();
final Consumer<Integer> _function = (Integer it) -> {
List<String> _get = this.scopes.get(it);
StringConcatenation _builder = new StringC... | java | public List<List<String>> getAllScopes() {
this.checkInitialized();
final ImmutableList.Builder<List<String>> builder = ImmutableList.<List<String>>builder();
final Consumer<Integer> _function = (Integer it) -> {
List<String> _get = this.scopes.get(it);
StringConcatenation _builder = new StringC... | [
"public",
"List",
"<",
"List",
"<",
"String",
">",
">",
"getAllScopes",
"(",
")",
"{",
"this",
".",
"checkInitialized",
"(",
")",
";",
"final",
"ImmutableList",
".",
"Builder",
"<",
"List",
"<",
"String",
">",
">",
"builder",
"=",
"ImmutableList",
".",
... | Returns with a view of all scopes known by this manager. | [
"Returns",
"with",
"a",
"view",
"of",
"all",
"scopes",
"known",
"by",
"this",
"manager",
"."
] | bac941cb75cb24706519845ec174cfef874d7557 | https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/server/semanticHighlight/SemanticHighlightingRegistry.java#L223-L235 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.